This content has moved to https://go.treasuredata.com/tddocs_workflow
Workflow py Operator Syntax Reference
TD Workflow supports the Python operator to run custom scripts, which are triggered by other command operators in TD Workflow.
The py> operator runs a Python script using Python command.
See Python API documents for details including variable mappings to keyword arguments.
+step1: py>: my_step1_method +step2: py>: tasks.MyWorkflow.step2
py> : [tasks.][PACKAGE.CLASS.]METHOD
- [tasks.] -
- [PACKAGE.CLASS] - Optional class name of your Python object.
- METHOD - Name of the task defined within your Python object class that defines the action that you want performed during this stage of the TD Workflow.
py > : tasks . MyWorkflow . my_task
python : PATH STRING or COMMAND ARGUMENTS LIST
The python defaults to python . If an alternate python and options are desired, use the python option.Examples:
python: / opt / conda / bin / python python: [ "python" , "v" ]
It is also possible to configure this in an export section.
_export: py: python: /opt/conda/bin/python