Configuration
Add anaiTransformation block to the transformation section:
| Field | Type | Description |
|---|---|---|
instruction | string | A natural language description of the transformation to apply to every row. |
Examples
Date format conversion:How it works
- Datris extracts column names and sample rows from the data, combines them with your instruction, and sends a single prompt to the AI model.
- The AI generates a self-contained Python 3 script (stdlib only) that reads the input file, applies the transformation, and writes the output.
- The script is executed locally via
python3. Processing cost is zero after the initial API call. - The transformed data replaces the original and continues through the pipeline to destinations.
Works with all file types
- CSV/delimited files — The script reads and writes CSV with the appropriate delimiter.
- JSON files — The script parses JSON, transforms records, and writes JSON.
- XML files — The script uses
xml.etree.ElementTreeto parse, transform, and write XML.
CLI
Requirements
ai.enabled: truemust be set inapplication.yaml- The Vault secret for the AI provider must be configured (see AI Configuration)
python3must be available on the pipeline server runtime