This node transforms a JSON column into multiple columns by automatically inferring the structure of the JSON data. It works best with well-structured, relatively flat JSON objects that follow a consistent schema across all rows.
You can choose between two main extraction approaches. One option is to extract only the primitive leaf values (such as strings or numbers), ignoring their full JSON paths. The other option is to retain the complete JSON structure. However, keeping the full structure may lead to less intuitive results, since the resulting columns can contain JSON values or collections of JSON rather than simple data types.
For example, consider JSON inputs like:
- {"a": {"b": [1, 2], "c": "c"}}
- {"a": {"b": [3], "d": null}}
- b : either a JSON array or a list of integers, depending on whether arrays are preserved as JSON or expanded into collections
- c : string values
- d : string values (with missing entries where not present)
Another option is to use full JSON paths as column names (for example, a.b.0 , a.b.1 , a.c , a.d ) and expand arrays into separate columns. This produces more granular columns, such as individual elements of arrays and nested fields.
For more complex nested structures, behavior depends on additional settings:
- If nested objects are omitted and only shallow levels are considered, arrays may be simplified to lists of primitive values.
- If nested objects are kept, arrays can contain mixed JSON elements (e.g., objects and numbers together).
- When preserving arrays as JSON, the output remains closer to the original structure regardless of other settings.