register() | teradataml DataFrame | Teradata Package for Python - register() - Teradata VantageCloud Lake

Lake - Analyze Your Data with ClearScape Analytics™

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Publication Date
February 2025
Publication ID
B700-4600-004K
ft:locale
en-US
ft:lastEdition
2026-02-20
dita:mapPath
tcl1683670667798.ditamap
dita:ditavalPath
pny1626732985837.ditaval
ft:sourceId
dita
dita:id
tcl1683670667798

register() function registers a Python function or teradataml udf and stores it in Database Engine 20 for future use. This makes the function reusable across sessions, unlike udf - Function decorator, which is limited to a single session.

Registered UDFs are stored in Database Engine 20 as a runnable Python script, which is executed using the Apply table operator. See teradataml UDF Prerequisites.

When working with Open Analytics Framework, registered UDFs are stored in either the default user environment or the environment specified by the user in the configuration option.

Registered UDFs are stored in the file system or user environment with the naming convention as tdml_udf_name_<registered udf name>_udf_type_<return type>_register.py.

Be careful when deleting these files directly.

Arguments

Argument Required/Optional Type Description
name Required string Specifies the name of the user defined function to register.
user_function Required function, teradataml udf Specifies the user defined function to create a column for teradataml DataFrame.
returns Optional teradatasqlalchemy types object Specifies the output column type.

When not specified, default is VARCHAR(1024).

If 'user_function' is a teradataml udf, then return type of the udf is used as return type of the registered UDF.​