Extract data from a JSON file. The file must contain a JSON 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!
[
[
[
"json",
{
"sample": 1000,
"subtable": null,
"data_key": "root_node",
"mapping": {
"id": "product_id",
"created": "metadata.created",
"title": "metadata.title",
"modified": "metadata.modified",
"sunriseTimestamp": "aggregate_metadata.scheduleLifecycles[0].sunriseTimestamp",
"sunsetTimestamp": "aggregate_metadata.scheduleLifecycles[0].sunsetTimestamp"
},
"header": [
"dim_A",
"dim_B"
],
"_comment": null
}
]
]
param str data_key: Defines the root object of the JSON file. If no data_key is specified, the first node will be used as root node.
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.