Data Export is an add-on featureData Export is available as an add-on feature to select plans. To learn more, read about our pricing. To add Data Export to your plan, contact Sales.
- Create a service principal
- Choose an authentication method
- Create a SQL warehouse
- Give catalog and schema permissions
- Set up the integration in LaunchDarkly
Prerequisites
To configure the Databricks Data Export integration, you must have the following prerequisites:- You must have a LaunchDarkly role that lets you add and edit integrations and add destinations
- You need to allow the LaunchDarkly data transfer service’s static IP address:
35.192.85.117
One Data Export destination per environmentYou can configure only one Data Export destination per LaunchDarkly environment, regardless of destination kind. If you need more than one Data Export destination for the same data, configure them in different environments.
Create a service principal
We recommended that you use a Databricks Service principal to provide LaunchDarkly service access to your warehouse. To create a new service principal, follow the Databricks instructions to Add service principals to your account. Ensure that the principal has Workspace access and Databricks SQL access entitlements. To learn how, read the Databricks documentation about Access entitlements.Choose an authentication method
LaunchDarkly supports two methods for authenticating the Databricks Data Export integration:- OAuth M2M: LaunchDarkly authenticates with the client ID and client secret of a Databricks service principal. This is the default method when the authentication method control appears in the configuration form.
- Personal access token: LaunchDarkly authenticates with a Databricks personal access token (PAT).
Expand Create OAuth M2M credentials
Expand Create OAuth M2M credentials
Create OAuth M2M credentials
LaunchDarkly connects to your warehouse as the service principal using OAuth machine-to-machine (M2M) authentication. Generate an OAuth secret for the service principal, then provide its client ID and secret to LaunchDarkly. To learn more, read the Databricks documentation about OAuth machine-to-machine (M2M) authentication.To generate the credentials:- In the Databricks account console, click Settings, then open Identity and access and find “Service principals.”
- Select the service principal you created, then copy its Application ID. This is your client ID.
- Open the service principal’s Secrets tab, then click Generate secret.
- Set a Lifetime (days) for the secret, then click Generate.
- Copy the Secret and save it in a secure location. Databricks displays the secret only once. This is your client secret.
Expand Create a personal access token
Expand Create a personal access token
Create a personal access token
Use this procedure if you select Personal access token when you set up the integration. First create a workspace token in Databricks. Then use that token to create the PAT that LaunchDarkly uses. Finally, grant your service principal permission to use personal access tokens.To create a workspace token:- Navigate to Workspace settings > Developer.
- Click Manage.
- Click Generate new token.
- Copy and save the token. You use this token as the bearer token in the next request.
DATABRICKS_HOSTNAME with your workspace hostname, EXISTING_TOKEN with the token from the previous steps, and LIFETIME_SECONDS with the token lifetime in seconds:- Navigate to Workspace settings > Workspace admin > Advanced > Personal access tokens > Permission settings.
- Add the service principal you created.
- Assign the Can use permission.
Create a SQL warehouse
Now, follow the Databricks instructions to Create a new SQL warehouse. Under permissions, assign the Can use permission to the service principal you created above. Under Connection details, find and save the Server hostname and HTTP path of the warehouse. You will need these when setting up the integration in LaunchDarkly.Give catalog and schema permissions
Then, give the service principal you created the appropriate permissions for your destination catalog and destination schema. For your destination catalog, give the service principal theUSE CATALOG permission.
For your destination schema, give the service principal the following grants:
USE SCHEMAAPPLY TAGMODIFYREAD VOLUMESELECTWRITE VOLUMECREATE MATERIALIZED VIEWCREATE TABLECREATE VOLUME
Set up the integration
To configure the integration in LaunchDarkly:- Click the gear icon in the left sidebar to view Organization settings.
- Click Integrations and find “Databricks Data Export.”
- Click Add integration. The Databricks Data Export configuration page appears.
- Give the integration a human-readable Name.
- Choose a Project and environment to export data from. Environments that already have a Data Export destination are unavailable.
- Enter the Server hostname you saved when you created a SQL warehouse. You can enter a bare hostname or prefix it with
https://, for exampledbc-abcd1234-5678.cloud.databricks.comorhttps://dbc-abcd1234-5678.cloud.databricks.com. Do not usehttp://. The value must be a hostname, with no path and no extra whitespace. - Enter the HTTP path you saved when you created a SQL warehouse. The path starts with
/sql/, for example/sql/1.0/warehouses/abc123. - Enter the Catalog and Schema to export data to. Catalog and schema names can contain only letters, numbers, and underscores. Hyphens are not allowed.
- Select an Authentication method. LaunchDarkly selects OAuth M2M by default. Click Personal access token to authenticate with a token instead.
- Enter the credentials for the method you selected:
- OAuth M2M: The Client ID and Client secret you created in a previous step. LaunchDarkly uses these credentials to connect to Databricks but does not store the client secret after setup.
- Personal access token: The PAT you created in a previous step.
- Select a Metastore of “Unity Catalog” or “Hive.” LaunchDarkly selects “Unity Catalog” by default.
- Enter the staging bucket details if you selected the “Hive” metastore: the S3 bucket name, the S3 bucket region, the Bucket access ID, and the Bucket secret key. LaunchDarkly uses the bucket secret key to connect but does not store it after setup.
- Read the Integration Terms and Conditions, then select the I have read and agree to the Integration Terms and Conditions checkbox.
- Click Test connection and save. LaunchDarkly tests the connection and, if it succeeds, activates the destination and starts the initial transfer.
View an existing destination
The destination setup is visible on the edit page so that you can confirm which host, HTTP path, catalog, schema, metastore, and client ID a destination uses. However, all fields on the edit page are read-only. LaunchDarkly never stores the secrets you provide at setup, so it cannot display them again. The Client secret field and the Bucket secret key field for a Hive metastore show a masked placeholder to indicate that you provided a secret when you created the destination. To view an existing Databricks Data Export destination:- Click the gear icon in the left sidebar to view Organization settings.
- Click Integrations and find “Databricks Data Export.”
- Find the destination you want to view and click Edit. The Databricks Data Export configuration page appears with the destination’s settings.