Skip to main content

Filters & operators

The SDK provides two expression wrappers: Column builds column conditions with Python operators, and Operator builds chained filter and dedup preprocessing pipelines. Both serialize to JSON, consumed by the server or by BlockX before your function runs.

Column expressions

Column(name) represents a column and supports comparison, logical, and set operations, returning a condition expression:

Serializing with filter

filter(expr) serializes a Column expression into a condition JSON string for downstream use:
filter also accepts input that is already a JSON string and passes it through unchanged.

Operator pipelines

Operator builds chained filter / deduplicate preprocessing pipelines, serialized into a structured execution plan:
This pipeline describes “filter by condition first, then dedup by tx_id”. It is usually attached to a BlockX task’s triggerSource so the engine preprocesses rows before calling your business function — source rows are trimmed first, and your function only handles the subset you actually care about.
Preprocessing pipelines are optional: simple logic is clearer written inside the function body, while a large number of rows with a high filter ratio benefits from filtering and deduping on the engine side first.