DataLab Docs
  • What is DataLab?
  • Work
    • Creating a workbook
    • Sharing a workbook
    • Managing a workbook
    • Code cell
      • Working with packages
    • Text cell
      • Including images
    • SQL cell
      • SQL scenarios
      • Parameterize your SQL query
    • Explore Data cell
    • Chart cell
      • Configuring your chart
      • Pivot charts
      • Migration guide
    • AI Assistant
    • Version history
    • Scheduled runs
    • Hiding and showing cells
    • Long-running cells
    • Report view
    • Environment variables
    • Git and GitHub
  • Connect to Data
    • Connect your data to DataLab
    • Sharing a Data Source
    • Airtable
    • Amazon Athena
    • Amazon S3
    • Databricks
    • Dropbox
    • Files
    • Google Drive
    • Google BigQuery
    • Google Sheets
    • MariaDB
    • Microsoft SQL Server
    • MongoDB
    • MotherDuck
    • MySQL
    • Oracle Database
    • PostgreSQL
    • Redshift
    • Snowflake
    • Supabase
  • Guides
    • Publish a notebook
    • Importing data from flat files
    • Resizing plots
    • Show Bokeh and Pyvis plots
  • Resources
    • Pricing
    • Manage group settings
    • Reporting for Group Admins
    • DataLab for education
    • Technical requirements
    • Addressing slow code
    • Address R vulnerability
    • Get help
Powered by GitBook
On this page
  • Set up a BigQuery warehouse
  • Set up a Google BigQuery connection
  • Query the database

Was this helpful?

  1. Connect to Data

Google BigQuery

PreviousGoogle DriveNextGoogle Sheets

Last updated 1 year ago

Was this helpful?

Set up a BigQuery warehouse

If you already have a BigQuery warehouse set up, you can skip this step.

  • Visit

  • In the search bar, look for BigQuery

  • Go through one of the guides to "Add your own data".

  • You can test that things work by querying the resulting dataset table.

Configure a Google Service Account

A Google service account is a special kind of account that can be used by programs to access Google resources like a BigQuery data warehouse. You will use this service account to connect DataCamp DataLab to your BigQuery warehouse.

Set up a Google BigQuery connection

When inside a workbook, click View > Databases, then click the + icon and follow the on-screen instructions. Upload the Service Account JSON and hit "Connect".

For detailed instructions, see Connect your data to DataLab.

Query the database

You can now query the BigQuery data warehouse with a SQL cell. Select it in the Select source dropdown in the top left corner of a SQL cell, or select the sample BigQuery data warehouse.

To set up a new Google Service Account, please refer to . At the end of it, you'll have the JSON credentials file that you can use to set up the BigQuery connection in DataLab.

this excellent guide
https://console.cloud.google.com
Create a BigQuery connection
Example of a SQL cell using the BigQuery Integration connection. The query result is available as df.