Using
bq --project_id=ny_proj load --source_format=NEWLINE_DELIMITED_JSON my_data.table1 \
sample.json schema.conf
I can load the data into table. However, i have been facing some limitations. In the json file, I have to ensure all the values are given properly in a single line. For instance, details of student_1 should be given in line 1 and student_2 should be in line 2 and so on.
In my case, there is one column called sql_script(which will hold the huge query inside the record). Below content for reference
{"id":"101","frequency":"daily","sql_script":"select * from table where
description = 'some random is given here for the sake of representation'"}
because of the query length, the single record is jumping into another line. While doing bq load, this is failing.
The below one works, if everything is fit in single line.
{"id":"101","frequency":"daily","sql_script":"select * from table"}