Use scripts and functions in pipelines
Where: a transform's Script or Function node. Connect the upstream data before configuring arguments and outputs.
Script node#
- Add Script and select its language.
- Add dependencies only when the code requires them. Standard-library-only scripts have the simplest runtime setup.
- Declare the output columns in Output columns.
- Write the code in Script.
- Preview the node with a small upstream sample.
The Script panel exposes language, packages, output columns, and code.
The Script panel exposes language, packages, output columns, and code.
The Script panel exposes language, packages, output columns, and code.
The Python starter uses main(input) and returns one dictionary per output row. A minimal example preserves every upstream field:
Python
def main(input):
return [dict(row) for row in input]
When adding a calculated field, update the declared output schema too. A downstream node can only map the columns the pipeline knows are available. Inspect the selected language's starter rather than assuming its entry function matches a standalone Platform function.
Function node#
- Create and test the reusable function in Functions first.
- Add Function and select it.
- Map upstream columns to its argument/input keys.
- Map the function's output keys back to pipeline columns.
- Preview a known input and check the result against a direct function test.
Function configuration connects a reusable function to upstream and downstream fields.
Function configuration connects a reusable function to upstream and downstream fields.
Function configuration connects a reusable function to upstream and downstream fields.
A function can need entity, secret, or AI provider bindings in addition to pipeline columns. Configure these in the function's access/settings form; naming an argument does not grant resource access.
Diagnose execution errors#
Check the run/preview error, entry-point contract, declared outputs, dependency availability, and input types. Test a pure calculation before adding an external API call. If a script or function can write outside Platform, inspect that system before retrying an interrupted execution.
Was this page helpful?