title: “1-out Python UDF” description: “User-defined function operator in Python script” category: “Python” operator_type: “PythonUDFSourceV2” tags: [user-defined-functions, python]

Home > User Defined Functions > Python

Input Properties

PropertyRequirementTypeDefaultDescription
Python scriptCode (python)See template belowInput your code here
Worker countInteger1Specify how many parallel workers to launch
ColumnsList-The columns of the source
↳ Attribute NameString-
↳ Attribute Typestring, integer, long, double, boolean,
timestamp, binary, large_binary
-
ParametersList-Values inferred from active self.UiParameter(...) calls.
See UI parameters.

Default Code Template

Python script

# Define UiParameter inside GenerateOperator.open().
# Example: self.count = self.UiParameter("count", AttributeType.INT).value
# See the Python UDF operator documentation for supported types and behavior.
#
# from pytexera import *
# class GenerateOperator(UDFSourceOperator):
# 
#     @overrides
#     
#     def produce(self) -> Iterator[Union[TupleLike, TableLike, None]]:
#         yield

Output Ports

PortMode
0Set Snapshot