Mark Olliver
Mark Olliver

Reputation: 87

bq shell project Error

I have been testing out the bq module as we are looking at using bigquery. I have a project setup and the api's authorised. When I run bq shell I am dropped into the shell correctly with the correct project name however, when I try and run mk dataset_name. I get the following error: BigQuery error in mk operation: Not Found: Project dataset_name.

I have tried re-authenticating a couple of times but nothing makes a difference.

Any Ideas?

Thanks

Mark

Upvotes: 3

Views: 1459

Answers (1)

Jordan Tigani
Jordan Tigani

Reputation: 26617

It looks like you don't have a default project ID. If you are using the Google Cloud SDK, gcloud will set up a default project for you. You can also use bq init to set a default project. Alternately, you can just pass the project_id you want to use on the command line, as bq --project_id=<your_project_id> shell. Finally, your other options specify the project when creating the dataset as in >mk your_project_id:dataset_name from the bq shell.

Upvotes: 4

Related Questions