Connect to Databricks from Microsoft Excel
This article describes how to use the Databricks ODBC driver to connect Databricks to Microsoft Excel. After you establish the connection, you can access the data in Databricks from Excel. You can also use Excel to further analyze the data.
Before you begin
Create a Databricks cluster and associate data with your cluster. See Run your first ETL workload on Databricks.
Install and configure the ODBC driver (Windows | MacOS | Linux). This sets up a Data Source Name (DSN) configuration that you can use to connect Databricks to Microsoft Excel.
Install Microsoft Excel. You can use a trial version.
Steps to connect from Microsoft Excel
This section describes how to pull data from Databricks into Microsoft Excel using the DSN you created in the prerequisites.
Note
The steps in this section were tested using Excel for Microsoft 365 for Mac version 16.70.
Open a blank workbook in Microsoft Excel.
In the Data ribbon, click the down caret next to Get Data (Power Query), then click From database (Microsoft Query).
In the iODBC Data Source Chooser, select the DSN that you created in the prerequisites, and then click OK.
For Username, enter
token
.For Password, enter your personal access token from the prerequisites.
In the Microsoft Query dialog, select the Databricks table that you want to load into Excel, and then click Return Data.
In the Import Data dialog, select Table and Existing sheet, and then click Import.
After you load your data into your Excel workbook, you can perform analytical operations on it.