Parses an NDJSON-formatted ("newline delimited JSON") file based on the parameters set in the transformation. The file must contain an NDJSON array as the top level object, and each member of the array will be treated as a row of data.
Example

I Ain't Afraid of No Code!
[
[
"ndjson",
{
"sample": 1000,
"subtable": null,
"header": [
"dim_A",
"dim_B"
],
"mapping": {
"id": "product_id",
"created": "metadata.created",
"title": "metadata.title",
"modified": "metadata.modified"
},
"_comment": null
}
]
]
param list header: List of fields will be used as header and used in lookup for corresponding key-value pairs.
param int sample: If no header is specified, fields will be discovered by sampling keys from the first N objects.
param str missing: Defines which values are handled as missing.
param dict mapping: Pairs of "target":"source". Sub-nodes can be accessed by node.sub_node. Arrays can be accessed by node[index].
Comments
0 comments
Article is closed for comments.