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.
| Type | Description |
|---|
| Data | Dataset containing JSON column(s) |
Output
| Type | Description |
|---|
| Transformed Data | Data with a new column containing extracted values from JSON |
Configuration Fields
| Field Name | Required | Description |
|---|
| Column Name | Yes | The column that contains the JSON string |
| Output Column | Yes | Name of the new column that will hold the extracted result |
| JSON Path | Yes | JSONPath expression to select the value from the JSON (e.g., $.user.name) |
| Include Original | No | If enabled, retains all original columns; otherwise, shows only the result |
| ID | Data |
|---|
| 1 | {“user”: {“name”: “Alice”, “age”: 25}} |
| 2 | {“user”: {“name”: “Bob”, “age”: 30}} |
| 3 | {“user”: {“name”: “Charlie”, “age”: 28}} |
Sample Configuration
| Field | Value |
|---|
| Column Name | Data |
| Output Column | ExtractedValue |
| JSON Path | $.user.name |
| Include Original | No |
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