Skip to main content
A preprocessor is an optional REST endpoint that is called before data quality and transformation. It receives the ingested data and can modify, enrich, filter, or replace it before the pipeline continues processing. Use a preprocessor when you need to call out to an external system for data enrichment, format conversion, or custom logic that runs before AI-powered data quality and transformation.

Processing Flow

Configuration

Add a preprocessor section to the pipeline configuration:

Fields

Synchronous Mode

In synchronous mode (async: false), the pipeline POSTs the data to the endpoint and waits for the response. The response replaces the pipeline data.

Request Payload

For JSON/XML sources, rows is null and rawData contains the raw content.

Expected Response

Return the (optionally modified) data in the same format:
You can modify, add, or remove rows. The pipeline continues with whatever data is returned. If you return an error field, processing is aborted:

Asynchronous Mode

In asynchronous mode (async: true), the pipeline POSTs the data and then waits for a callback rather than using the response directly. This is useful for long-running preprocessing tasks.

Flow

  1. Pipeline POSTs data to the preprocessor endpoint
  2. Preprocessor returns immediately (e.g., 200 OK)
  3. Preprocessor processes data in the background
  4. Preprocessor POSTs the result back to the pipeline’s callback endpoint
  5. Pipeline resumes with the returned data

Callback Endpoint

The preprocessor sends the result to:
Callback payload:
The pipelineToken must match the token from the original request so the pipeline can correlate the callback with the waiting job. If the callback is not received within timeoutMs milliseconds, the pipeline aborts with a timeout error.

Example: Preprocessor Service

A complete working example is provided in examples/preprocessor/app.py. This Python Flask application implements both synchronous and asynchronous preprocessing:
To run:
Then configure the pipeline: