Export Table Structure into json File

Hi there,
I am a total newbie to Knime and try exporting the row headers of table A as a json file “schema.json”. I need the json file to upload table A to Google Big Query (with “External Tool” node).
The json file should look something like this:

[ { "mode":"NULLABLE", "name":"address", "type":"string" }, { "mode":"NULLABLE", "name":"content", "type":"string" }, { "mode":"NULLABLE", "name":"status_code", "type":"int64" }, { "mode":"NULLABLE", "name":"status", "type":"string" } ]

Is there any way to solve this in Knime?

Thanks a lot to this great community.


1 Like

the type mapping might be difficult, but otherwise there is Extract Column Header, Table to JSON, and JSON Transformer. I think with those nodes it can almost be done, only the data types will give you some trouble. Is it feasible to give a mapping from column name to data type manually, in a Table Creator node?
Kind regards

Hi Alexander,
Many thanks for your response. However, it is not easy for me, not to say impossible, to get the nodes to produce the desired output. The question of the “type matching” has not even been partially solved. In this case, the simplest solution for me is actually to edit the json file by hand. Thank you anyway. I will not give up :wink:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.