- Dot notation:
address.city,address.anotherLevel.key - Array index:
phoneNumbers[0].type,phoneNumbers[1].number - Array slice (all elements):
phoneNumbers[:],phoneNumbers[::] - Array slice (range):
phoneNumbers[0:2],phoneNumbers[0:2:1] - Array slice (with step):
phoneNumbers[::2] - Quoted keys (for special characters):
address["other info"] - Root array access:
$[:].firstName
- Wildcard
[*]— use[:]instead - Negative indices
[-1] - Recursive descent
..
Usage
The following examples show how the step can be used in a recipe.Examples
Examples
- Example 1
- Example 2
- Example 3
- Example 4
- Example 5
- Example 6
- Example 7
- Example 8
- Example 9
- Example 10
- Signature
Extract a simple nested value.
Inputs & Outputs
The following are the inputs expected by the step and the outputs it produces. These are generally columns (ds.first_name), datasets (ds or ds[["first_name", "last_name"]]) or models (referenced
by name e.g. "churn-clf").
Inputs
Inputs
A text column with Json values to extract parts from.
Outputs
Outputs
The column resulting from evaluating the JsonPath expression on the input column.
Configuration
The following parameters can be used to configure the behaviour of the step by including them in a json object as the last “input” to the step, i.e.step(..., {"param": "value", ...}) -> (output).
Parameters
Parameters
JsonPath-like string used to extract values from the JSON column. Supports dot notation, array indices, slices and quoted keys. Does not support wildcard [*], negative indices or recursive descent (..).
Examples
Examples
- address.city
- phoneNumbers[:].type
Output column type.
Select the desired type using a shortened yet fully specified name.Values must be one of the following:
boolean category date number text url list[number] list[category] list[url]