This section explains different ways to execute a Python function without pulling the data outside of Analytics Database. Consider a scenario where you want to run analytics capabilities on the data residing in Analytics Database, that are not already present in teradataml built-in functionality.
teradataml provides functions where you can apply your own logic to process and transform data within teradataml DataFrame. Use these functions/DataFrame methods to address specific data processing requirements beyond the built-in functions provided by teradataml.
- These functions avoid pulling data out of Analytics Database. Instead, the Python function is pushed to Analytics Database, eliminating data movement between the client and Analytics Database.
- teradataml UDF is a Python user defined function, and it is different from the Teradata UDF which offers support for C++/C/Java UDF functions.
- udf - Function decorator
- UDF functions
- DataFrame methods
- apply (supported in VantageCloud Lake)
- map_row and map_partition (supported in VantageCloud Enterprise)
Use of teradataml UDF versus DataFrame Methods provides a breakdown differences between teradataml UDF versus DataFrame methods, and when to use each.