0
votes

I am having issues with the BQ-Command line tool. Specifically when trying to query a dataset/table, whether one the public datasets or my own I get the error:

BigQuery error in query operation: Cannot start a job without a project id.

I have a project id set as default as per the attached screen shot. Any help you could give would be appreciated. :-)

Thanks

BigQuery> ls projectId friendlyName


de********nts          De********ing  

BigQuery> query 'select count(*) from publicdata:samples.shakespeare' BigQuery error in query operation: Cannot start a job without a project id. BigQuery> show publicdata:samples.shakespeare Table publicdata:samples.shakespeare

Last modified Schema Total Rows Total Bytes Expiration


22 Oct 07:27:07 |- word: string (required) 164656 6432064
|- word_count: integer (required)
|- corpus: string (required)
|- corpus_date: integer (required)

1

1 Answers

0
votes

You should configure gcloud command-line tool first:

gcloud config set project 'yourProjectId'

This project is billed for querying not public data.

Then you can run your query:

bq query 'select count(*) from publicdata:samples.shakespeare'