Ingest
Handling JSON
This section covers JSONPath
Syntax
- JSONPath expressions start with
$
, which refers to the root of the JSON document - Dots
.
indicate traversal to a child property - Brackets
[]
can access elements in arrays
Example
Given the following data structure:
This is the corresponding YAML configuration:
Top-Level Fields: Fields like product_id
and event
are mapped directly since they are at the root of the JSON structure
Nested Fields: JSONPath is used to extract data from deeper levels of the JSON object:
$.extra_data.city
maps to thecity
column.$.extra_data.discount.amount
maps to thediscount_amount
column.