Skip to main content

Connect Google Sheets to Databricks

Summary

  • Google Sheets integration: Databricks connector for Google Sheets lets business users import governed Unity Catalog tables, metric views, and queries as refreshable data without SQL knowledge.
  • Flexible data import: Users can browse catalogs, select tables, apply filters, set row limits, and choose output destinations—all through an intuitive interface in Google Sheets.
  • Scheduled refresh: Imported data can be updated on a schedule or manually refreshed, and saved imports can be edited to adjust filters or remove columns without re-importing the entire table.

Connect Google Sheets to Databricks

Watch: Connect Google Sheets to Databricks
How to import governed Databricks data into Google Sheets
Discover how business users can easily bring Unity Catalog tables, Metric Views, and shared queries into Google Sheets as refreshable, governed data - no SQL or complex setup required.
Video chapters:

Chapters

FAQs

How do users access Databricks data from Google Sheets?

Open the Databricks connector extension in Sheets and launch the sidebar. Browse your catalog and schema to select tables or metric views. The add-in presents all data governed by Unity Catalog with your access permissions.

Can data imports be filtered and customized?

Yes. Users can filter by column values, set row limits, select specific fields, and choose output locations. For example, filter for specific countries or date ranges before importing data into the sheet.

What happens when you schedule a refresh?

Scheduled refreshes automatically update imported data at regular intervals. Users can also manually refresh for the latest data and modify saved imports to adjust filters or columns.

How does the connector maintain data governance?

All data is governed by Unity Catalog, so users only see data they have permission to access. The integration maintains audit trails showing who accessed what data and when.

Full transcript

0:00 Intro

The Databricks Google Sheets add-in makes it easier than ever for business users and financial analysts to work with governed data from the Databricks Lakehouse right inside sheets. I'm Jared Champion, a senior solutions architect at Databricks, and in this video, I'll walk you through how to use the Google Sheets add-in to explore and import data. You'll see how to open the add-in, browse Unity Catalog, select a table or metric view, and apply filters to bring in exactly the data you need.
Let's get started. First, we're going to open the Google Sheets add-in for Databricks. Come to extensions, select Databricks connector for Google Sheets, and launch sidebar. Once this is opened, we're going to see our uh warehouse that we're connected to, as well as our import methods. We can choose to select data or write SQL. We'll start with selecting data. From the drop-downs here, we can select our catalog, open up our schema, and then finally select the table we're going to look at.

0:47 Import a table

I've got two tables here. I've got a flat table and a metric view. We're going to start with the flat table. Once this table opens, you can see that we can select the fields that we want to bring in. We can also add or remove a filter, um and set a limit on the rows that we're going to bring in. So, for this one, let's add a filter. We'll choose franchise country uh contains US. Um I'll leave the limit at 1,000. I've got less than 1,000 rows, but you can choose to have a limit if you want.
And we can also select the output destination. For this one, I'm going to choose the current sheet. Um that was my selected cell, so I'll just set that back to A1. And then we'll save and import. Now that this data is imported, we can see that this is a named range in our sheet. We can select the entire table. We can work like that just like a Google Sheets table in any other context. Um we can also adjust the range, play with any of the formatting.
And if we come to our saved imports, um we can also update if we want to, for example, drop one of the columns or if I wanted to update the filter, we could do that here and then update and bring that data through with our changes. And we can see that's updated to have removed the transaction ID. And we can also just simply refresh that to bring in the latest data to our Google Sheet. We can also choose to schedule a query into our Google Sheets.

2:54 Set up a scheduled refresh

We can come to this calendar icon in the corner, select create schedule, give our schedule a name, maybe daily schedule, select which data we want to refresh, the frequency we're going to refresh it, and the time it's going to refresh, along with the warehouse that we're going to use to run that schedule. Clicking create schedule will ask us to sign in, authenticate the connector for Google Sheets. And that authorization is now finished and my schedule is set up.
We can come to manage schedules to see what schedules we have that are active and make any changes to the configuration. Next, we're going to have a look at importing our metric view. So, we'll come to the catalog, select main again, drop into our finance schema. And then we're going to be selecting our revenue metrics metric view table. As it's a metric table, you can see this pivot data checkbox is automatically being clicked.

3:47 Import a metric view

You can also pivot table for flat data, not just metric views, but it automatically identifies this when we're working with a metric view. Here, we'll select some data. So, maybe do franchise on the row, um product on the columns. Let's give our value to be total revenue. Uh and we'll add a filter just like last time. Um let's look at our purchases coming from Japan. Similarly, we've got the output destination for a pivot table.
This one's fixed. It's going to create it into a new sheet for us. While that's importing, it's important to note that using metric tables are a great way for us to push our business logic down to the data lake. This means we can define our semantic layer in a common area where all users can leverage it for all workloads. So, business users don't need to manually figure out the right joins or aggregations. The metric definitions are centralized, governed, and reusable across any of the tools that we're working with.
We can see that this has loaded our pivot table in. We can um update this much in the same way that we did with our other um other tables. We can come and edit this, uh make any changes to our rows and columns, update, and import that as well. The final method we want to look at is using a direct query to pull our data out. So, if we come to the import method and select write SQL, we can type in a query that's been provided to us maybe by our data team, or maybe that we've uh written previously.

5:33 Write SQL

You can see in this query, I've actually got a parameter here. This means that I can pull in and pass in uh part of the query from a reference material I have on our sheet. This could be useful if I'm supplying a pre-made workbook with these queries already ingested, and I want to give our users a way to quickly update or change the parameters coming into their queries. So, in this case, I'm going to add a parameter.
I'm going to map it to country, cuz that's what my parameter's name is here with the hyphen. And I'm going to point to where the reference is. So, I've got a reference sheet set up, and this is in cell A1 on our reference sheet. We can push this into a new sheet as well. I'll call this one custom query. Save and import, and that's going to execute our custom query, load it in as a table, and enable us to control that as updates much like we did with our structured table and metric view queries.

6:51 Outro

Thanks for watching. You've seen how the Databricks Google Sheets add-in empowers business users to access, explore, and refresh governed data from the lakehouse, all within sheets. To learn more, explore the documentation linked in the caption. Thank you.

Learn more about the Databricks Data and AI platform.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.