🛢️How to Connect Google Sheets to BigQuery: A Simple Guide

Max Makhrov
4 min readDec 10, 2024

--

In the world of AI, Google Sheets is still cool. It’s loved for its functions, easy sharing, and the wonder of Google App Script. But sometimes, it’s not enough. As your business grows, it may feel small, like a toy house. That’s when BigQuery comes in. It’s a strong tool for big data. It works well with Sheets and many apps you use. Plus, it’s easy to start and gives you free credits. Let’s explore how to connect Google Sheets to BigQuery, step by step.

Way 1

Upload Data from Sheets to BigQuery with Cooltables

First, install Cooltables from the Workspace Marketplace.

Open Google Sheets, go to Extensions, and launch Cooltables.

Select “the Sheets to BigQuery” task.

Choose your sheet and cloud project.

No dataset? Create one with a click.

Now, let the add-on detect fields for BigQuery.

Set a table name and choose how to update.

Click the big green button.

Your task is done!

Check your BigQuery table and run a query to see the results.

Your sheet is now in BigQuery!

Way 2

Upload Data from Sheets to BigQuery Using BigQuery Interface

Enter Google Cloud Console. Find your project. Create a dataset; think of it as a folder for tables.

Please give it a clear, simple name. Leave other settings for now.

Create a table.

Change Source to Drive.

Paste your Google Sheet’s URL.

Set file format to Google Sheet

Define your sheet range. Tip: you can use sheet name, or range address here:

Name your table.

Define each column in your schema.

Tip: Do not use the “Auto detect” checkbox. It may end with unexpected types.

Skip header rows in advanced options. I put 1 as my headers in Sheets is in row 1.

Create your table and check the schema. Run a query to ensure it works. Try making changes in Sheets to see updates in BigQuery.

Advanced Tips for Success

For seamless integration, follow these tips:

  1. Consistent Data Types: Ensure each column has one data type.
  2. Don’t Rename Sheets: Avoid breaking links by renaming sheets.
  3. Use Pivot Tables: In Sheets go to theData → Data Connections (Connected Sheets) use BigQuery, to analyze large data sets.
  4. Load vs. Link: Using the Cooltables add-on, directly load Sheet’s data (not checking “Link to BigQuery). Use loading instead of linking if you change the sheet’s structure.

Using Google Sheets with BigQuery can improve how you manage data. Together, they make data handling easier and more efficient. Connect, manage, and grow. That’s the magic of Google tools at your fingertips. Happy exploring!

--

--

Max Makhrov
Max Makhrov

Written by Max Makhrov

Google Sheets Developer, automation expert

No responses yet