Converts a JSON column to multiple columns, whereby the column list is heuristically extracted from the
JSON structure. It can either extract the primitive leaf elements (like strings and numbers), omitting the
JSON tree path, or the full JSON structure. The latter, however, may yield some confusing output as the types
of the columns are again JSON or collections of JSON.
Note that this node is meant to be used for "well-structured", relatively flat JSON objects which adhere the
same schema in all rows. In case the JSON objects are more complex it's better to use nodes like
JSON Path or JSON Path (Dictionary).
Some examples on the following JSON column input may help to clarify the generated output.
JSON |
---|
{"a": {"b": [1, 2], "c":"c"}} |
{"a": {"b": [3], "d":null} } |
b | c | d |
---|---|---|
[1,2] | c | ? |
[3] | ? | ? |
1
, Use leaf name (uniquify with (#1)/(#2)/...)a |
---|
{"b": [1, 2], "c":"c"} |
{"b": [3], "d":null} |
.
, Expand to columnsa.b.0 | a.b.1 | a.c | a.d |
---|---|---|---|
1 | 2 | c | ? |
3 | ? | ? | ? |
JSON |
---|
{"a":[{"b": 3}, 4]} |
{"a":[1]} |
1
, Use leaf name (uniquify with (#1)/(#2)/...), Omit nested objects, Expand to columns:a |
---|
[4] |
[1] |
1
or 2
, Use leaf name (uniquify with (#1)/(#2)/...), do not Omit nested objects, Expand to columns:a |
---|
[{"b": 3}, 4] |
[1] |
{"b": 3}
and 4
, not a single JSON value, similarly in the second row, you get a KNIME list of a single JSON value: 1
.
a |
---|
[{"b": 3}, 4] |
[1] |
(#nn)
.You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.
To use this node in KNIME, install the extension KNIME JSON-Processing from the below update site following our NodePit Product and Node Installation Guide:
A zipped version of the software site can be downloaded here.
Deploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com.
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.