I am trying to convert a json to ndjson so that I can use it in BQ.
The full script can be found here.
When I run the conversion, I get the following error: "There was an error or your JSON is not valid. Details: jsonObject.map is not a function."
I can't find jsonObject.map anywhere in the script :/
Any help would be greatly appreciated!
You can consider this code to convert json to
NEWLINE_DELIMITED_JSONand load the data into BigQuery.Output:
Also you can consider this code by speciying BigQuery schema and storing json data file in GCS bucket.