BigQuery - How to find the error stream?

While using the bq command to load data into Bigquery, you will often have reject/error records based on bad data in the columns or even mismatch in the number of columns. 

The Error message usually looks like the below:

Error While reading data, error message: CSV table encountered too many \nerrors, giving up, Rows: 3894; errors:1 Please look into the error \nstream for more details

\n\n

Where to find the error stream?

\n\n

Run the following command in the terminal:

\n\n
bq --format=prettyjson show -j <JobID>\n
\n\n

It returns a JSON with more details. In my case it was:

\n\n
"message": "Error while reading data, error message: Could not parse '16.66666666666667' \nas int for field Course_Percentage (position 46) starting at location 1717164"\n

Bozhack-miller

posted on

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds