Jupyter on BigQuery
- 28 May 2023
- 1 Minute to read
- Print
- DarkLight
- PDF
Jupyter on BigQuery
- Updated on 28 May 2023
- 1 Minute to read
- Print
- DarkLight
- PDF
Article Summary
This article explains how to connect Jupyter Notebook to a Google BigQuery data warehouse. It provides instructions on how to install the Panoply package in your Python environment, either via conda or pip, and then generate an authorization code for your BigQuery account. Once the authorization code is generated, it can be used to successfully connect Jupyter Notebook with the data warehouse.
Panoply on Big Query
- Install pandas-gbq in your Python environment.
Install latest release version via conda
conda install pandas-gbq --channel conda-forge
Install latest release version via pip
pip install pandas-gbq
- Import the packages as below:
from pandas.io import gbq
- Run the below command in your Python environment:
df=gbq.read_gbq("<Your query>", project_id="<Your project name>")
- Click the highlighted link to generate an authorization code for your Google BigQuery account. You will be asked to choose your BigQuery account.
- Click Allow.
- An authorization code will be generated. Copy and paste as shown below:
You have successfully connected Jupyter Notebook to your BigQuery data warehouse.
Was this article helpful?