Transformation
JSON Transform
Transform document payloads using JSONPath expressions and mapping rules
Why do anything?
Document schemas may not match consumer expectations. Transformation enables schema adaptation.
Why now?
Different consumers need different views of the same data.
Why this feature?
Transform document payloads with JSONPath selection, field mapping, and computed fields.
How It Works
JSON transform modifies document payloads during retrieval.
1
Rule Parsing
Parse transformation rules
2
Field Selection
Select fields with JSONPath
3
Mapping
Apply field mappings and renames
4
Computation
Compute derived fields
Why This Approach
JSONPath provides powerful selection. In-pipeline transformation avoids post-processing.
Where This Is Used
Integration
retriever = client.retrievers.create(stages=[{"type": "json_transform", "mappings": {...}}])