Skip to main content
A JsonPath is a string that uses a syntax similar to XPath to extract values from JSON objects. The syntax is described in the JsonPath Online Evaluator.

Usage

The following example shows how the step can be used in a recipe.

Examples

  • Example 1
  • Signature
Extract all the cities from a column with Json values.
extract_json_values(ds.text, {
  "path": "address.city",
  "type": "text"
}) -> (ds.cities)

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").
text
column[text|category]
required
A text column with Json values to extract parts from.
value_extracted
column
required
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

path
string
required
JsonPath string used to extract the values from the JSON values of the columns.
  • address.city
type
string
required
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]
I