Add Databricks as a data source in Pendo Predict

Last updated:

Connect a Databricks workspace to Pendo Predict to use your Databricks data when building predictive models.

To set up the connection, you create a Databricks service principal, give it access to the data you want Pendo Predict to read, and then add the connection in Pendo Predict.

Prerequisites

Before you begin, make sure you have:

  • Workspace admin or owner access in Databricks to create a service principal and grant permissions.
  • A Databricks workspace with Unity Catalog enabled. Pendo Predict uses Unity Catalog to discover catalogs, schemas, tables, and columns.
  • At least one SQL warehouse (serverless or classic) that Pendo Predict can use to run queries.
  • The catalogs, schemas, and tables you want Pendo Predict to access.

Step 1: Create a service principal

  1. In your Databricks workspace, select Settings.
  2. Go to Identity and access > Service principals.
  3. Select Add service principal, then Add new.
  4. Enter a descriptive name, such as pendo-predict-integration.
  5. Save the service principal.

Step 2: Generate OAuth credentials

  1. Open the service principal you created.
  2. Select the Secrets tab.
  3. Select Generate secret. You can optionally choose an expiration date.
  4. Copy the Client ID and Client Secret.

Important: The client secret is displayed only once. If you lose it, you need to generate a new secret.

Keep these credentials available. You'll enter them when you create the connector in Pendo Predict.

Step 3: Grant access to a SQL warehouse

Grant the service principal Can Use permission for the SQL warehouse that Pendo Predict will use.

  1. Go to SQL > SQL Warehouses.
  2. Select the warehouse you want Pendo Predict to use.
  3. Open the Permissions tab.
  4. Select Grant access.
  5. Search for your service principal.
  6. Assign the Can Use permission.
  7. Save your changes.

Step 4: Grant Unity Catalog permissions

Grant the service principal access to the catalogs, schemas, and tables that Pendo Predict needs to read.

The service principal requires the following permissions:

PrivilegeLevelPurpose
USE CATALOGCatalogAllows the service principal to list schemas in the catalog.
USE SCHEMASchemaAllows the service principal to list tables in the schema.
SELECTSchema or tableAllows the service principal to read table metadata and data.

You can grant these permissions using Catalog Explorer or SQL.

Grant permissions at the schema level to give Pendo Predict access to current and future tables in that schema. Grant permissions to individual tables when you need more granular access.

Grant permissions using Catalog Explorer

  1. Go to Catalog.
  2. Navigate to the catalog, schema, or table you want Pendo Predict to access.
  3. Open the Permissions tab.
  4. Select Grant.
  5. Search for your service principal.
  6. Assign the appropriate permissions from the table in this section.
  7. Repeat these steps for each catalog and schema that Pendo Predict should access.

Grant permissions using SQL

Run the following statements as a catalog owner, metastore admin, or account admin.

Replace:

  • <application-id> with the service principal's Client ID.
  • <catalog> with your catalog name.
  • <schema> with your schema name.
GRANT USE CATALOG ON CATALOG <catalog> TO `<application-id>`;
GRANT USE SCHEMA ON SCHEMA <catalog>.<schema> TO `<application-id>`;
GRANT SELECT ON SCHEMA <catalog>.<schema> TO `<application-id>`;

To grant access to a single table instead of the entire schema, replace <table> with the table name and run:

GRANT SELECT ON TABLE <catalog>.<schema>.<table> TO `<application-id>`;

Repeat the appropriate statements for every catalog, schema, or table that Pendo Predict should be able to read.

Step 5: Connect Databricks to Pendo Predict

Before continuing, have the following information available:

  • Workspace host: Copy the workspace domain from your browser's address bar. For example, dbc-xxxxxxxx-xxxx.cloud.databricks.com. Don't include https://, a path, or query parameters.
  • OAuth client ID: Use the Client ID for the service principal.
  • OAuth client secret: Use the client secret you generated in Step 2.

To create the connector:

  1. Click the Sources->Data connector on the Pendo Predict app
  1. Select New source and choose MS Dynamics 365.
  1. Enter a name for the connection.
  2. Enter your workspace host, OAuth client ID, and OAuth client secret.

  3. After you enter these values, the SQL warehouse and catalog lists populate automatically.
  4. Select the SQL warehouse that you granted access to in Step 3.
  5. Select the catalog that you granted access to in Step 4.
  6. Select Authorize to complete the connection.

Pendo Predict validates the connection after you save it. If validation succeeds, you can start building templates and querying the tables that you granted access to.

Step 6: Manage the Databricks data source

After you create the data source, you can test the connection and share it with other users.

  • To test the connection, select the More options icon (three dots), then choose Test connection.
  • To share the source, select the More options icon, then choose Share. When shared, other users can use the Databricks source when building predictive models.

Security and access

Pendo Predict currently has read-only access to your Databricks workspace. It doesn't create, modify, or delete resources.

The connector can:

  • List SQL warehouses, catalogs, schemas, tables, and columns that the service principal can access.
  • Use DESCRIBE QUERY to validate a query's output without executing the query or reading table data.
  • Use SELECT queries to read data from tables that you configure in your Pendo Predict templates.

You control what Pendo Predict can access through the Unity Catalog permissions assigned to the service principal. You can revoke access or rotate credentials at any time without affecting individual user accounts.

Using a dedicated service principal also means that the connection isn't tied to an individual employee account.

Was this article helpful?
0 out of 0 found this helpful