Working with BigQuery
BigQuery is a popular option for a cloud data warehouse. It’s part of GCP and its integrations with other Google technologies such as cloud functions, Google Analytics, and Looker Studio make your life easier.
When using pandas, you can utilize the pandas-gbq
library and use methods such as .read_gbq()
and .to_gbq()
that help you work with BigQuery with ease. There are no such built-in methods in Polars, however, we’ll try other approaches for how we can read from and write to BigQuery in this recipe.
Getting ready
You need to create a BigQuery dataset to work with. Here’s how to create one:
- Make sure to choose your project (in my case, it’s
sandbox
) and go to BigQuery. - Click on the three dots and choose Create dataset.
Figure 11.43 – Creating a new dataset
- Enter your dataset name and click on CREATE DATASET.
Figure 11.44 – Entering...