Databricks SQL
Access configuration details to connect Soda to a Databricks SQL data source.
For information about how to connect to Databricks Spark Dataframes, see: Example contract: Spark - Databricks
Connection configuration reference
Install the following package:
pip install soda-databricksData source YAML
Core connection
Create the config file:
soda data-source create -f ds_config.ymlDatabricks supports three authentication methods. Set auth_type to choose one. If you omit auth_type, Soda uses personal access token authentication.
Every method shares these connection parameters:
type
Yes
—
Must be databricks.
host
Yes
—
Databricks workspace hostname, for example abc.cloud.databricks.com. A leading https:// or http:// is removed.
http_path
Yes
—
HTTP path for the SQL warehouse or cluster.
catalog
No
—
Default catalog to use.
session_configuration
No
—
Optional session configuration dictionary.
auth_type
No
personal-access-token
Authentication method. One of personal-access-token, databricks-oauth-m2m, azure-service-principal.
Personal access token
Supported in Soda Cloud and Soda Core.
auth_type
No
personal-access-token
Omit, or set to personal-access-token.
access_token
Yes
—
Databricks personal access token.
Databricks OAuth (machine-to-machine)
Supported in Soda Cloud and Soda Core.
Authenticates with a Databricks-managed OAuth service principal using the client-credentials flow. Create the service principal and generate an OAuth secret in Databricks (see Databricks' documentation on OAuth machine-to-machine (M2M) authentication). Soda derives the token endpoint from host, so no token URL is required.
auth_type
Yes
—
Must be databricks-oauth-m2m.
client_id
Yes
—
Databricks OAuth service-principal client ID.
client_secret
Yes
—
Databricks OAuth service-principal client secret.
Azure service principal
Supported in Soda Cloud and Soda Core.
Authenticates Azure Databricks with a Microsoft Entra ID (Azure AD) service principal. Register the application in Entra ID and note its client ID, client secret, and directory (tenant) ID (see Microsoft's documentation on creating a Microsoft Entra ID application and service principal). Soda requests the token from login.microsoftonline.com, so the tenant ID is required.
auth_type
Yes
—
Must be azure-service-principal.
azure_client_id
Yes
—
Entra ID (Azure AD) service-principal application/client ID.
azure_client_secret
Yes
—
Entra ID (Azure AD) service-principal client secret.
azure_tenant_id
Yes
—
Entra ID (Azure AD) directory/tenant ID.
Test the connection
Test the data source connection:
Last updated
Was this helpful?
