1-out Python UDF
User-defined function operator in Python script
Home > User-defined Functions > Python
| Operator | Description |
|---|---|
| 2-in Python UDF | User-defined function operator in Python script |
| Python Lambda Function | Modify or add a new column with more ease |
| Python Table Reducer | Reduce Table to Tuple |
| 1-out Python UDF | User-defined function operator in Python script |
| Python UDF | User-defined function operator in Python script |
Total: 5 operators
The Python UDF, 2-in Python UDF, and 1-out Python UDF operators can expose values in the property panel. Declare each value with self.UiParameter(...) inside the UDF class’s open() method, then use its .value in later methods.
from pytexera import *
class ProcessTupleOperator(UDFOperatorV2):
@overrides
def open(self):
self.count = self.UiParameter("count", AttributeType.INT).value
@overrides
def process_tuple(self, tuple_: Tuple, port: int):
# self.count contains the value entered in the property panel.
yield tuple_
Active calls are inferred from the script; commented-out calls are ignored. The supported classes are ProcessTupleOperator, ProcessBatchOperator, ProcessTableOperator, and GenerateOperator. Supported types are STRING, INT/LONG, DOUBLE, BOOL, and TIMESTAMP. Empty strings are valid for STRING; all other types require a non-empty value before execution.
User-defined function operator in Python script
User-defined function operator in Python script
Modify or add a new column with more ease
Reduce Table to Tuple
User-defined function operator in Python script
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.