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

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

Solution ?

Method #1 Set default project

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

\n\n
    \n
  • 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

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

Example:

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

mCollins

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