udf Decorator with Arguments | teradataml DataFrame | Teradata Package for Python - Using udf Decorator with Arguments - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Package for Python
Release Number
20.00
Published
March 2025
ft:locale
en-US
ft:lastEdition
2026-01-07
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

udf() accepts several arguments as input so you can tune a Python function and notify teradataml when to use the function.

Argument Required/Optional Type Description
returns Optional teradatasqlalchemy types object Specifies the output column type.

When not specified, default is VARCHAR(1024).

env_name Optional string or object of class UserEnv (Applicable for use with Apply table operator)

Specifies the name of the remote user environment or an object of class UserEnv for VantageCloud Lake.

delimiter Optional One-character string Specifies a delimiter to use when reading columns from a row and writing result columns.

Default is comma (,). If data being processed contains a comma, use a different delimiter.

quotechar Optional One-character string Specifies a character that forces input of the user function to be quoted using this specified character.
debug Optional bool Specifies whether to remove the temporary script generated during execution and display the file path or not. This argument is useful for debugging if there are any failures when executing the function. When set to True, function displays the path of the script and does not remove the file from local file system. Otherwise, file is removed from the local file system.