Databricks
UI Bakery allows you to easily connect to a Databricks SQL database with no need for additional layers like APIs or third-party services.
Configuration
Prerequisites
Before connecting Databricks to UI Bakery, make sure you have:
A Databricks workspace URL.
A SQL warehouse path.
Access to the target catalog and schema.
One of the supported authentication methods:
A Databricks personal access token.
A Databricks service principal with OAuth credentials for Client Credentials Flow.
If your database is hosted behind a Firewall, you need to add our IP addresses to the Firewall whitelist.
Authentication methods
UI Bakery supports two authentication methods for Databricks:
Access token
You want to connect with an existing Databricks personal access token. This is the default method.
Access token
Client Credentials Flow
You want UI Bakery to connect as a Databricks service principal instead of an individual user.
Client ID, Client secret
Access token
Use this option to connect with a Databricks personal access token.
To configure it:
In the Authentication settings section, select Access token.
Enter your Databricks Access token.
Fill in the rest of the connection settings.
Click Test connection.
Client Credentials Flow
Use this option to connect through a Databricks service principal. This method does not require a user login, redirect, or consent screen in UI Bakery. UI Bakery connects to Databricks using the service principal credentials.
To configure it:
Create or choose a Databricks service principal.
Make sure the service principal has access to the required Databricks SQL warehouse, catalog, schema, and tables.
Create an OAuth secret for the service principal in Databricks.
In UI Bakery, open the Databricks data source connection settings.
In the Authentication settings section, select Client Credentials Flow.
Enter the service principal Client ID.
Enter the service principal Client secret.
Fill in the rest of the connection settings.
Click Test connection.
The client secret is stored as an encrypted credential in UI Bakery.
For more information about Databricks service principal OAuth credentials, see the Databricks documentation on OAuth machine-to-machine authentication.
Connecting the data source
Now, to connect your data source, follow the steps below:
On the Data sources page, click Connect, and select Databricks in the Data sources list.
Specify all the required credentials and click Test connection.
Once the connection is verified, click Connect Datasource to complete the setup.

UI Bakery will extract the database structure and store column types. This data will be used to suggest the proper table columns and form field types.
If you need to be able to override the default data source catalog with a custom value in the action, you can enable the Allow override catalog name in action setting in the Data source connection window. Once enabled, you will be able to specify a custom database when configuring an action. In case a database is not specified, the default data source database will be used.

Usage
Once you have established the connection between UI Bakery and Databricks, you can access its data - load it and send it back.
UI Bakery supports the SQL Query action step for this data source.
Last updated
Was this helpful?