BigQuery error in load operation: Not found: Project during bq load

Problem 🔍

While loading files into Bigquery from the bq command line utility, you will have to set the default project or the bq load will throw the below error

bq load --source_format=NEWLINE_DELIMITED_JSON <project-id>:<my-dataset.table>
gs://<project-id>.appspot.com/nt.ndjson
BigQuery error in load operation: Not found: Project <project-friendly-name>

Solution 💡

Method #1 Set default project

Set the default working project before you execute the bq load command

  • gcloud config set project <project-id>

Method #2 Pass the project-id via an argument

Embed and pass the project id in the bq command like shown below

  • bq load --project_id=<project-id> ...

Example:

bq load --project_id=<project-id> --source_format=NEWLINE_DELIMITED_JSON 
<my-dataset.newtable> gs://<project-id>.appspot.com/nt.ndjson

mCollins

posted on 05 Mar 19

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