Skip to main content

How to Connect Databricks SQL to Excel and Google Sheets with Governed Live Data

Summary

  • Excel add-in: loads filtered data into pivot tables and writes results back to Databricks.
  • Private Link support: embedded iframe enables Private Link workspaces without extra proxy setup.
  • Scheduled refreshes: Google Sheets connector refreshes on any schedule with Genie integration coming.

How to Connect Databricks SQL to Excel and Google Sheets with Governed Live Data

Watch: How to Connect Databricks SQL to Excel and Google Sheets with Governed Live Data
Talk by Toussaint Webb, Sr. Product Manager, Databricks
Business users can work with governed, always-current Databricks data directly inside Excel and Google Sheets, so self-service analysis no longer depends on an analyst exporting a file. This video shows the Excel add-in in public preview loading filtered data into pivot tables, saving imports for one-click refresh, importing Unity Catalog metric views, and writing tables back to Databricks for users with permission. Because it runs through an embedded iframe from the user's own laptop, Private Link workspaces work with no extra setup, and the Google Sheets connector adds scheduled refreshes.
The Excel add-in (public preview) loads data with filters into pivot tables, saves imports so you can refresh with one click, and writes tables back to Databricks for users with permission. It runs through an embedded iframe directly from the user's laptop, so Private Link workspaces work with no extra proxy, and admins can deploy it from the Microsoft 365 admin center. Google Sheets adds scheduled refreshes, for example every Monday at 6 AM, with run history. Genie integration is coming so users can ask questions in natural language and send results to a sheet as a table or chart.

Chapters

FAQs

Can I work with Databricks data in Excel?

Yes—the Excel add-in loads filtered data into pivot tables, and you can save imports so they refresh with one click. The add-in runs from your laptop, so Private Link workspaces work with no extra proxy.

How do I get a Databricks metric view into Excel?

Use the Excel add-in to import a Unity Catalog metric view directly into Excel, apply filters and load it into a pivot table. You can also write Excel data back to Databricks if you have permission.

Can I schedule Databricks data refreshes in Google Sheets?

Yes—the Google Sheets connector lets you schedule refreshes on any schedule, such as every Monday at 6 AM, with run history tracking so you know when data was last updated.

Is there a natural-language interface for Excel?

Genie integration is coming, so you'll be able to ask questions in natural language from within Excel and Google Sheets and send results to a sheet as a table or chart.

Full transcript

00:00 Introduction

So, my name is Toussaint. I'm a product manager at Databricks, where I work on our partner ecosystem. Which really means that I want to take everything cool that's in Databricks and make it available outside of Databricks. Today we'll talk about two of my favorite integrations, namely Excel and Google Sheets. In this limited time, we will consider three points. We'll explain why we created this connection between Databricks, Excel, and Google Sheets, give a quick overview of the connector for Excel, a quick overview of the connector for Google Sheets, and finally talk about upcoming updates for both of these tools.

00:43 Why connect Databricks to Excel and Google Sheets

So, okay. So, possibilities. Why did we create this? Love it or hate it, and I know many of you might hate it, especially if you work on a data platform team. Organizations and businesses rely on Excel, Google Sheets, and other spreadsheet tools. We build all these complex data platforms, but the reality is that our business users actually live in programs like Excel. And to make data platforms as successful and effective as possible, they need to connect to these tools so that people can perform self-service analytics , whether it's financial budgeting, sales forecasting, planning —the list goes on and on.
The problem was that before these connectors were created, moving data from Databricks to Excel and Google Sheets was a very difficult task. Is n't that right? There was architectural complexity: you had to create your own connector, buy a third-party solution, or implement many intermediate layers to make it work. Another thing—depending on your implementation, you could be getting stale data, right? If an analyst ran SQL queries, downloaded data, and emailed it to someone, once that file became available, it was already outdated.
This does not quite fit with the principle of a data platform, which should always be up-to-date and be the single source of truth. And the third problem was the bottleneck— data analysts who often had to run these SQL queries for users to give them access to the data and ensure its democratization. So, that's what we set out to solve: give you a way to easily access data, do it in a managed way, and ensure it's always up to date.

02:32 Excel add-in: import data and write back

Let's start with Excel. In short, we created an add-in for Excel, which is available in public preview today. This add-on allows you to do two main things. The first is data import. Users can select tables or metric views, apply filters, and load this data into Excel. The second thing is that you can write data back to Databricks directly from Excel. Right ? If a user, for example, is working with planning data and has a small table, they can perform table-level operations: create a new one or overwrite an existing one.
I want to emphasize: only users with appropriate permissions can do this. Let me repeat: only users with permissions can write tables and data back to Databricks. Let's take a very brief look at the architecture. Essentially, we have embedded an iframe into Excel . This iframe sends requests to the Databricks dashboard service. Once in the dashboard service , we direct requests to the appropriate Databricks APIs. The main conclusion from this slide: all traffic goes through the user's laptop.

03:21 Architecture: how the add-in connects without a proxy

So if you have a private Databricks workspace or are using Private Link, it doesn't matter , as the traffic comes directly from the user's laptop . We do not add any additional servers or proxy layers to the client. One quick note about deploying to Excel. There are two main ways to deploy an add-in. The first is administrative deployment. The administrator logs in to the Microsoft M365 admin center. He selects the Databricks add-in or uploads his own add-in.

04:01 Deploying the Excel add-in: admin vs sideloading

Then deploys it to a group of users or to the entire organization. After that, when someone opens Excel, they will see this information. This is the recommended path for the simplest, no- configuration setup for most of your users. You configure it once and every user gets access. We have another option: self- installing and uploading the manifest by sideloading it into Excel. We recommend this for testing purposes only, because if you plan to roll this out to all your users, everyone will have to manually download and configure everything on their own, which is a real headache.

05:01 Demo: import a Unity Catalog metric view into Excel

So that's all . Now I'll quickly demonstrate how it works. Imagine I'm not a product manager at Databricks. I'm a retail manager and I need to know how my stores have been performing recently for my quarterly report . Let me go over here. So, I ... Oh. You need to log in . Uh... Okay. Perfectly. I'm in the Excel add-in . As you can see, it is displayed here in the top corner. You select it, and a directory browser opens in front of you.
It works the same way as in Databricks, so you can search and filter data. I know exactly what I'm looking for, so I'll choose the right metric representation. You will see all the fields you have access to. You can search for the fields you need and do whatever you want. But again , I need to know what the sales were for this quarter. So I can just start dragging the fields. Let's look for the necessary data. Store name.
Receipts. Yes? You can now download this data. The SQL repository will now start . Once the repository is loaded, the data will appear as a pivot table, as this is a metric representation of the Unity Catalog. Once it finishes loading... uh... That's it. Now I have a metric representation that shows all this information. One of the questions I am often asked is: “My users are used to working with SAP or standard Excel pivot tables.
They want to drag and drop fields to make the connection "live." Although we cannot provide this because we do not have an ODBC, XMLA, or MDX type connection, users can still drag and drop fields. So if I search for a channel, they drag the field and then click Import Results again. We will delete the old pivot table. Let 's create a new one, and then reload all the information. And when I'm satisfied with the results of the pivot table and its configuration, all I have to do is change the button to " Save and Import".
I click again and the configuration is saved. Yes? So now whenever I need to re-run this analysis, I just need to click “refresh all” or refresh this data asset in the saved imports tab and I don’t have to reconfigure the configuration every time. In general, this is how this add-on works. I keep track of time. We don't have much time. Very quickly, we have the ability to record back. It works like this: you choose whether you want to replace an existing table or create a new one, you select a portion of the data.

08:05 Writing data from Excel back to Databricks

We then download a preview of this data. Using this view, you can change the column names. You can change the column types. And you can also exclude columns. If I scroll down and click "create table", it will create the table using file upload. So, this is the same thing you could do in the Databricks interface to create this table for you. And then you'll have a full history of who created the table, when it was created, and all that.

08:54 Google Sheets connector and scheduled refreshes

So let me go back to the slides. And let's quickly talk about Google Sheets. So, Google Sheets is a generally similar experience. There are some differences in architecture and construction method. Ahem. No. Oh, that's it. So, yes, it's a similar slide. Again, Google Sheets allows you to import data, select tables or metric views, apply filters, and load data. The only additional benefit of the Google Sheets connector is support for scheduled updates.
So, if you need this data to be refreshed every Monday at 6:00 AM, you can schedule an update for that particular data asset. The architecture is very similar. Again , we are embedding an iframe. The only difference is that the request goes through the Google App Script server, as it is through App Script that they interact with add-ons in the Google Marketplace. And then this request is simply forwarded to Databricks cloud management services, where we call the appropriate interface resources and APIs.
These are reviews. The superstructure is being implemented in many organizations. Customers trust it to democratize data access for their business units and business users. We hope that you will also become one of these organizations. And now I can quickly go to this screen and show you the add-in for Google Sheets. So, this is the data that I've already pulled in using the Google Sheets connector. Let me go here. The Google Sheets connector, just like here, has a SQL or non-SQL interface that can be used to extract data, depending on what is more convenient for the user.

10:32 Demo: schedule a Google Sheets data refresh

And here we have a saved import. Again, I can update the data. But as I mentioned , regarding scheduled updates, I can set up a schedule, give it a name, select the asset I want to schedule, and choose the schedule configuration. I have already set up a schedule for use. So here I can show you the launch history for this particular schedule . I set this up a few minutes ago, so it only ran once, but imagine using it for 10-30 days, you'll see tons of successful scheduled runs.
You can also manage schedules. Here you can see the configuration. Again , you can see the last five runs, and delete or change the schedule as you wish. Let me go back. So, what's new to expect in both of these connectors? One really cool thing we're working on is integrating Genie into both interfaces. This means you can open Genie in both add-ins and have a dialogue: "Hey Genie , what were my sales last weekend? What were my sales last month?"

12:02 Genie in Excel and Google Sheets

Genie will perform the analysis, return the results, and we can say, " Okay, now upload this to Excel or Google Sheets as a table, bar chart, or pie chart." So, you can still get the data that Genie provided, but now it will be in Excel. You don't even need to write SQL queries. You don't even have to press anything. You can simply type in a question and get the answer you are looking for. This is a work in progress.
We plan to launch this this quarter for Databricks. And lastly, scheduled updates in Excel, we're adding this capability so that if you're doing, say, quarterly reports or something like that, you can be sure that the data is up-to-date and ready to go. This is the end of the slides. Three things I want you to remember. We built this add-in to be where users work. They work in Excel. They work in Google Sheets. We want to make the data platform as accessible as possible for them.

13:15 Key takeaways and enabling the preview

But we want to make sure we do it in a controlled manner, and that we have a single source of truth. That's why we integrated the writeback feature so they don't create a new data platform in Excel. And we hope that this will be a single workflow. So where can you turn after that? We have several videos on YouTube about Excel and Google Sheets that go into more detail on how to use these features. Of course, we have documentation for you to read.
Regarding Excel, since it is currently in public preview for some customers, you may need to go to the preview tab in the workspace and enable it. Other than that, that's all I wanted to say today.

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.