Converts the selected columns content to a JSON value row-wise or column-wise. It also have an option to "undo" -with some limitations- the JSON to Table transformation and create JSON values for each row based on the column names.
Example input table:
a.b
a.c
d
b0
c0
d0
b1
c1
d1
With the different parameters, the following JSON values are generated: Row-oriented
Keep rows (with Column names as paths, separator: .):
{
"a" : {
"b" : "b0",
"c" : "c0"
},
"d" : "d0"
}
{
"a" : {
"b" : "b1",
"c" : "c1"
},
"d" : "d1"
}
Options
Input columns
The selected columns will be transformed.
Row keys|Omit row key
The row keys will be omitted, not used in the generated JSON value (which are arrays when the rows are not kept).
Row keys|Row key as JSON key
The row keys are added to the generated JSON value as a key, in this case not an array, but an object is created.
Row keys|Row key as JSON value with key
The row keys will be included in the generated JSON (array) value with the specified key.
Row-oriented
the values from the selected columns are collected and concatenated row-wise to a JSON object/array, after that these are combined by the rows to a single JSON value.
Column-oriented
the values from the selected columns are collected and concatenated column-wise to a JSON object/array, after that these are combined by the columns to a single JSON value.
Keep rows
the selected columns are combined to a new JSON column containing the values from the columns and the name of the columns as keys. This option does not combine the rows of the input table.
Remove source columns
When checked, the source columns are removed when the rows are kept. It has no effect for the other Aggregation direction options, when all columns are removed.
Column names as paths, where path separator in column names
When From column names as path is selected, this value will be used to find the keys for JSON columns based on the column names.
Missing values are omitted
Missing values from the input table do not generate a key in the resulting JSON structure, they are omitted completely.
Note that in a column-oriented transformation (see above) missing cells will still be inserted a null values in the column's array because otherwise the row arrays for different
columns may have different numbers of entries. This would make it impossible to reconstruct the original table
Missing values are inserted as 'null'
Missing values from the input table are insert as null values.
To use this node in KNIME, install
KNIME JSON-Processing
from the following update site:
KNIME 4.3
A zipped version of the software site can be downloaded
here.
You don't know what to do with this link? Read our
NodePit Product and Node Installation Guide
that explains you in detail how to install nodes to your KNIME Analytics
Platform.
Wait a sec! You want to explore and install nodes even
faster? We highly recommend our
NodePit for KNIME
extension for your KNIME Analytics Platform. Browse NodePit from
within KNIME, install nodes with just one click and share your
workflows with NodePit Space.
Developers
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.
Contact
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,
follow @NodePit on Twitter,
or chat on Gitter!
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.