Marlene Prado
Refer to Biquery API documentation.
In order to use the Google Cloud Platfomr in Colab we need to authenticate our GCP account.
from google.colab import auth
auth.authenticate_user()
This step include specify the project on which we are going to work in our GCP Platform. In order to perform this step we need to have a gmail account registered in Google Cloud Platform. We can use the GCP free trial for this purpose.
project_id = "YOUR_PROJECT_ID"
In order to use the BigQuery API we need to import the right library for our resource, in this case BigQuery
from google.cloud import bigquery
From this point ahead you will specify to which Dataset and which table you will access. We will use Public Datasets that are available in BigQuery for us to practice.
- Chicago News. Access using BigQuery API
- Chicago Crime. Access using BigQuery API
- Open Air Quality. Access using BigQuery API
- Hacker News. Use GROUP BY
- World Bank International Education. Use ORDER BY
- Chicago Taxi Trips. Use AS & WITH
- Stack Overflow. Use INNER JOIN
Enjoy swimming through this code ๐โโ๏ธ