For the complete documentation index, see llms.txt. This page is also available as Markdown.
BETA

Connect Databricks

Learn how to integrate Databricks with Harness FME to enable Warehouse Native Experimentation.

This feature is in Beta and requires enablement. View all early access features.

Warehouse Native Experimentation allows you to run experiments on data that already lives in your data warehouse. By connecting Harness FME directly to your Databricks SQL warehouse, you can securely query and analyze experiment data from your source of truth.

To begin, connect your Databricks SQL warehouse as a data source using either OAuth machine-to-machine (M2M) authentication with a service principal or a personal access token.

Prerequisites

Ensure that you have the following before getting started:

  • Access to a Databricks SQL warehouse, including its server hostname and HTTP path

  • A Unity Catalog catalog and schema containing your experiment data

  • A designated results table where experiment results are stored

  • A Databricks service principal with an OAuth client ID and secret, or a personal access token

Setup

Harness recommends the following best practices:

  • Use a service principal with OAuth M2M authentication rather than a personal access token tied to an individual user.

  • Grant read-only access to the catalog and schema containing the assignment and event data.

  • Grant write access only to the experiment results table.

To integrate Databricks as a data warehouse for Warehouse Native Experimentation:

  1. From the Harness FME navigation menu, click FME Settings and click View on a project on the Projects page. Then, navigate to the Data Source tab.

  2. Select Databricks as your data warehouse. In the Data Sources tab of your Harness FME project, select Databricks from the list of supported data warehouses.

    PROJECT EXPERIMENTATION TYPE

    A project uses a single experimentation type based on the metric source used.

    When you add a data source to a project, the project's experimentation type is set to Warehouse Native. All metrics in the project must then use Warehouse Native metric sources.

    If a project instead uses metrics created from an ingested event source, the project's experimentation type is set to Cloud.

  3. Enter the following connection details:

    Field
    Description
    Example

    Server Hostname

    The server hostname of your Databricks SQL warehouse.

    dbc-1a2b3c4d-5e6f.cloud.databricks.com

    Port

    The port of your Databricks SQL warehouse. Defaults to 443 if not specified.

    443

    HTTP Path

    The HTTP path of your Databricks SQL warehouse.

    /sql/1.0/warehouses/a1b2c3d4e5f67890

    Azure Databricks workspaces use a server hostname in the form adb-<workspace-id>.<n>.azuredatabricks.net.

  4. Select an authentication method from the Authentication list. Harness FME supports two authentication methods for connecting to Databricks:

    • OAuth M2M (recommended): Harness FME authenticates as a Databricks service principal using an OAuth client ID and client secret.

      Field
      Description

      Client ID

      The OAuth2 client ID of the Databricks service principal.

      Client Secret

      The OAuth2 client secret of the Databricks service principal.

    • Personal access token: Provide a Databricks personal access token with read access to the catalog and schema required for experiment metrics, and write access to the results table.

  5. Configure network access for private or IP-restricted workspaces. If your Databricks workspace restricts inbound traffic using an IP access list or private connectivity, Harness must be allowed network access to run experiment calculations against your warehouse.

    To enable connectivity:

    • Add the Harness outbound IP addresses to your workspace IP access list.

    • Allow traffic on the Databricks SQL warehouse port (default: 443).

    Harness FME maintains a list of static outbound IP addresses used for warehouse connections. You must allow these addresses for the connection to succeed.

  6. Test the connection by clicking Test Connection.

  7. Select a catalog and schema. After authentication, Harness FME retrieves the catalogs and schemas accessible to the service principal or token. Select the one containing your assignment and metric source tables.

  8. Specify a results table. Create a results table where Harness FME will write experiment analysis results, and ensure that:

    • The table exists in your catalog and schema.

    • The schema matches the expected format for experiment results below.

    Field
    Type
    Description

    METRICID

    STRING

    Unique identifier for the metric being calculated.

    METRICNAME

    STRING

    Human-readable name of the metric being calculated.

    METRICRESULTID

    STRING

    Unique identifier representing a specific calculation per metric, per experiment, per analysis run.

    EXPID

    STRING

    Unique identifier for the experiment associated with this metric calculation.

    EXPNAME

    STRING

    Human-readable name of the experiment associated with this metric calculation.

    TREATMENT

    STRING

    The experiment variant (e.g., Control or Treatment) associated with the metric results.

    DIMENSIONNAME

    STRING

    The name of the dimension being analyzed (e.g., country, platform).

    DIMENSIONVALUE

    STRING

    The corresponding value of the analyzed dimension.

    ATTRIBUTEDKEYSCOUNT

    BIGINT

    Count of unique keys (users, sessions, etc.) attributed to this metric result.

    REQUESTTIMESTAMP

    TIMESTAMP

    Timestamp when the metric computation request occurred.

    MIN

    DOUBLE

    Minimum observed value for the metric.

    MAX

    DOUBLE

    Maximum observed value for the metric.

    COUNT

    BIGINT

    Total number of observations included in the metric calculation.

    SUM

    DOUBLE

    Sum of all observed metric values.

    MEAN

    DOUBLE

    Average (mean) of the metric values.

    P50

    DOUBLE

    50th percentile (median) metric value.

    P95

    DOUBLE

    95th percentile metric value.

    P99

    DOUBLE

    99th percentile metric value.

    VARIANCE

    DOUBLE

    Variance of the metric values.

    EXCLUDEDUSERCOUNT

    BIGINT

    Number of users excluded from the analysis (due to filters, SRM, etc.).

    ASOFTIMESTAMP

    TIMESTAMP

    Timestamp representing when the result snapshot was written.

    To create the results table with the correct structure, run the following SQL statement in Databricks:

  9. Save and activate. Once the test passes, click Save to create the connection.

Your Databricks data source can now be used to create assignment and metric sources for Warehouse Native Experimentation.

Example Databricks configuration

Setting
Example

Data Warehouse

Databricks

Server Hostname

dbc-1a2b3c4d-5e6f.cloud.databricks.com

Port

443

HTTP Path

/sql/1.0/warehouses/a1b2c3d4e5f67890

Authentication

OAuth M2M

Catalog

ml

Schema

demo

Results Table

whn_metric_results

Next steps

Last updated

Was this helpful?