0

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 Answer 1

0

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'
Sign up to request clarification or add additional context in comments.

1 Comment

you can also can try bq --project=<you_project> query "select count(*) from [publicdata:samples.shakespeare]"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.