Most of a data script reads, reshapes, filters and loads, and each of those steps has a Trinium node. This guide maps the common pandas and PySpark steps to nodes, and shows how a pipeline calls the code no node covers.
The ideas
In a script
In Trinium
The script
Pipeline: nodes wired together on a canvas. Every node runs at once and rows stream between them.
A function or a block of steps
Node.
A dataframe passed from step to step
The rows on a wire. Every node shows its output columns as you build, before a run.
print() and a log file
The Data, Metadata and Messages tabs under the canvas, and rows in and out for every node of every run.
One input per database, each with a table picker or your own query. On Postgres, MySQL and SQL Server a bookmark reads only the rows past where the last successful run stopped.
Put it behind an HTTPS endpoint of your own; API Batch Lookup sends it the rows many at a time (see below).
Code no node covers
Some steps belong in code: a trained model, a library with no equivalent, a rule your team already maintains. Keep that code where you run code today, behind a small HTTPS endpoint: a function, a container or an internal service. API Batch Lookup sends it your rows, a hundred or more to a request, and adds each row's answer as new columns.
What it sends.{"rows": [row, row, ...]}, each row an object of its column values. The field name can be changed, so an existing model endpoint works as it is.
What comes back. A list with one answer per row, in the order sent, whose fields become new columns typed as you declare them.
What the endpoint does. You say whether it only calculates (a Test run calls it, so the preview shows real answers) or changes something (a Test run sends nothing).
When a call fails. The run stops naming the rows, or keeps them with empty answers and carries on, as you choose.
Credentials. The endpoint's address and credential live on a REST API connection, which sends them to that host only.
The function itself can be a few lines. The node's help has a Python AWS Lambda to start from. To build each request from one row's values instead, such as an id in the path, use API Lookup.
A step that only reshapes data is usually shorter as nodes than as a service: try the table above first.
Function names are from the public pandas API reference and PySpark API reference. Python is a trademark of the Python Software Foundation; pandas and Apache Spark are trademarks of their owners. Trinium is not affiliated with them.