How do I use gbq from pandas.io to pull BigQuery data into Colab?

147 Views Asked by At

I have been at this for over six hours and cannot figure out why this process is so difficult. I watched every YouTube video, went through every tutorial, but they all assume extensive knowledge of some step of the process that isn't covered in their tutorial.

I'm in BigQuery Sandbox. I did the tutorial offered in the right sidebar of this page.

At the end of this tutorial, you are given instructions on how to query the usa_1910_2013 table from the usa_names dataset. Here's how I'm left at the end of the tutorial:

BigQuery screenshot

Then I tried to use that SQL query and pull the resulting data into a Colab notebook using pandas.io gbq:

Colab screenshot

I get an error saying: "BadRequest: 400 POST https://bigquery.googleapis.com/bigquery/v2/projects/bquxjob_76da2ac5_189fab01b3f/jobs?prettyPrint=false: ProjectId and DatasetId must be non-empty"

In my first screenshot (of BigQuery), where is my project id? Where is my DatasetID? What do I type in the read_gbq() function for it to run properly?

0

There are 0 best solutions below