Skip to content

Extract with json path

Description

The Extract With JSON Path activity extracts data from JSON-encoded columns using a user-defined JSONPath expression. This is useful for parsing nested JSON objects and retrieving specific elements.

Use case:
When a column contains raw JSON (e.g., {"user": {"name": "Alice"}}), this activity allows you to extract specific values (e.g., .user.name) and move them to a separate column.


Input

TypeDescription
DataDataset containing JSON column(s)

Output

TypeDescription
Transformed DataData with a new column containing extracted values from JSON

Configuration Fields

Field NameRequiredDescription
Column NameYesThe column that contains the JSON string
Output ColumnYesName of the new column that will hold the extracted result
JSON PathYesJSONPath expression to select the value from the JSON (e.g., $.user.name)
Include OriginalNoIf enabled, retains all original columns; otherwise, shows only the result

Sample Input

IDData
1{“user”: {“name”: “Alice”, “age”: 25}}
2{“user”: {“name”: “Bob”, “age”: 30}}
3{“user”: {“name”: “Charlie”, “age”: 28}}

Sample Configuration

FieldValue
Column NameData
Output ColumnExtractedValue
JSON Path$.user.name
Include OriginalNo

Sample Output

ExtractedValue
Alice
Bob
Charlie

You can extract nested elements using dot notation, arrays with [index], and even filter expressions depending on your use case.
For example: $.users[0].name or $..name