This article describes how to connect to Databricks in order to load data into Datasets and Reports in Metric Insights.
NOTE: In v7.2.1 the "Password" and "Identity Profile" Auth Types were removed. When upgrading from an earlier version, Databricks Data Sources that used them are switched to Service Principal with an empty Client ID and Client Secret fields. Check your Databricks Data Sources after the version upgrade. For each one, insert the Client ID and Client Secret, or select "PAT" Auth Type and insert the Personal Access Token. Then click [Save] and [Test Connection].
1. Create a New Data Source
Access Admin > Collection & Storage > Data Sources
- [+ New Data Source]
- Select "Databricks" in the SQL section.
- [Next]
2. Complete Data Source Creation
- Name: Give the Data Source a descriptive name.
- Auth Type: Select the authorization type:
- Service Principal: This is the default Auth Type. It is used if there is a Service Principal set in the Databricks account. Insert Client ID and Client Secret after selecting this Auth Type.
- Client ID: Insert the Application ID of the Service Principal (in Databricks: Settings > Identity and access > Service principals).
- Client Secret: Generate it on the Secrets tab of the Service Principal.
- The Service Principal needs the CAN USE permission on the SQL Warehouse and the USE CATALOG, USE SCHEMA, and SELECT privileges on the data.
- PAT: Authentication is performed via the Personal Access Token generated in the Databricks account.
- Service Principal: This is the default Auth Type. It is used if there is a Service Principal set in the Databricks account. Insert Client ID and Client Secret after selecting this Auth Type.
- Host name and Database name: Provide the database host name and the title of the database. By clicking [Ping], the user can check connection to the mentioned host.
- Port: The "443" value is auto-filled by default.
- JDBC driver: The "Databricks" value is chosen in this field by default.
- JDBC string: This string is auto-generated by default, but the User can change it according to specific needs. Insert the JDBC URL from the page of the created SQL Warehouse in the Databricks account.
- "ConnCatalog" and "ConnSchema" parameters can be fount in the Catalog Explorer of the Databricks account.
- [Create]
NOTE: Be aware that Databricks driver doesn't have full compatibility with Java 21. If Arrow serialization errors occur with the Databricks JDBC driver, disable Arrow by setting EnableArrow=0 in the connection string. Disabling Arrow will not affect the functionality of the JDBC driver, but it may affect performance and memory usage.
3. Check the Connection
[Test Connection] to check if the system connects to the database successfully.
The next step would be creating a Dataset from the Databricks Data Source. For more information on that, check the Create Dataset from Plugin or SQL Data Source article.