Databricks Lakebase
Databricks Lakebase
Prerequisites
To use the OAuthClient authentication method, you must create a service principle in Databricks Lakebase and assign permissions. Refer to the Databricks documentation.
Next, the account or workspace administrator creates an OAuth secret:
-
At the new service principal’s details page, in the Developer Service Principal section, click the Secrets tab.
-
Under OAuth secrets, click the Generate secret button.
-
Enter the desired lifetime for the secret in days, up to a maximum of 730 days (two years). The admin console displays updated details about the new service principal, including the OAuth secret and the Client ID (which is the same as the service principal’s application ID).
-
Enter the Client Id and Secret in the fields below.
Setup Guide
Follow these steps to connect Databricks Lakebase to your Connect AI account:
-
Open the Connections page of the Connect AI dashboard.
-
Click + Add Connection in the upper-right corner.
-
Type Databricks Lakebase into the search field, then click the data source name.
-
On the Basic Settings tab of the new connection, enter a connection name or keep the default name.
-
Enter the host name or IP address of the Server name hosting the Databricks Lakebase database.
-
Enter the name of the target Databricks Lakebase Database.
-
For Databricks Instance, enter the URL for the user interface during normal access of the Databricks console. This should be in the format of
dbc-(id).cloud.databricks.com
. -
Enter the Port number of the server hosting the Databricks Lakebase database. The default value is 5432.
-
Select the Authentication method, then proceed to the relevant section and follow those instructions.
Authentication Methods
OAuthClient
-
Enter the OAuthClientId assigned when you configured the service principal (in the prerequisites).
-
Enter the OAuthClientSecret assigned when you configured the service principal (in the prerequisites). This value authenticates the application to the OAuth authorization server.
-
At the top of the Connect AI Add Databricks Lakebase Connection page, click Save & Test.
-
If the connection test succeeds, a Connection successfully saved message appears, indicating that your connection has been created. The Status on the Edit Connection page also changes to Authenticated. View the data model of your successful connection in the right pane of the Edit Connection page, in the Data Model tab.
-
If the connection test fails, ensure that you entered your login information correctly with no stray spaces or other characters. Connect AI displays error messages under the required fields with missing data. Some data sources require that you sign in directly to the source website. If you did not, an error message appears under the Sign in button. Correct the errors and try again.
-
Unsuccessful connections are saved as drafts and have a Status of Not Authenticated. You can return to the connection and authenticate it later.
-
OAuthPKCE
-
Enter the User Id of the authenticating user. The user obtains a temporary code from the authorization server.
-
At the top of the Connect AI Add Databricks Lakebase Connection page, click Save & Test.
-
If the connection test succeeds, a Connection successfully saved message appears, indicating that your connection has been created. The Status on the Edit Connection page also changes to Authenticated. View the data model of your successful connection in the right pane of the Edit Connection page, in the Data Model tab.
-
If the connection test fails, ensure that you entered your login information correctly with no stray spaces or other characters. Connect AI displays error messages under the required fields with missing data. Some data sources require that you sign in directly to the source website. If you did not, an error message appears under the Sign in button. Correct the errors and try again.
-
Unsuccessful connections are saved as drafts and have a Status of Not Authenticated. You can return to the connection and authenticate it later.
-