Skip to main content

Connect Snowflake

Overview

Warehouse Native ExperimentationA method of running feature management experiments directly within your data warehouse, leveraging its processing power and existing data infrastructure. allows you to run experiments on data that already lives in your data warehouseA centralized repository for storing and managing large volumes of structured and semi-structured data. Examples include Snowflake, BigQuery, Redshift, and Databricks.. By connecting Harness FME directly to your Snowflake instance, you can securely query and analyze experiment data from your source of truth.

To begin, connect your Snowflake instance as a data source.

Prerequisites

Ensure that you have the following before getting started:

  • Access to your organization's Snowflake instance
  • A Snowflake role with appropriate read access to the database and schema containing experiment data, and write access to a results table
  • A private key and associated user configured for key-pair authentication
  • A designated results table where experiment results are stored in Snowflake

Setup

Harness recommends the following best practices:

  • Use a service account rather than a personal Snowflake user.
  • Grant read-only access to the databases and schemas Harness FME queries.
  • Rotate private keys periodically.
  • If your Snowflake instance enforces inbound restrictions, confirm network and IP allowlisting.

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

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

  2. Enter the following connection details:

    FieldDescriptionExample
    Server (Account Identifier)Your Snowflake account identifier or server URL.xy12345.us-west-2
    WarehouseThe compute warehouse Harness FME should use to execute queries.ANALYTICS_WH
    DatabaseThe database containing your experimentation data.PROD_EXPERIMENTS
    SchemaThe schema within your database containing your experiment or metric data.AB_TESTING
    UsernameThe Snowflake username tied to your private key.fme_service_user
    RoleThe Snowflake role to assume for this connection.DATA_ANALYST
    Results Table NameThe name of the table where experiment results are stored.EXPERIMENT_RESULTS
    Note

    Harness FME respects Snowflake's built-in role-based access controls. The data source connection only has access to objects allowed for the specified role.

  3. Provide authentication credentials. Harness FME supports key pair authentication for secure, password-less access.

    • Option 1: Paste your private key directly into the text field.
    • Option 2: Upload a private key file.

    Ensure the key corresponds to the username provided and is not encrypted with a passphrase.

  4. Select a database and a schema. After authentication, you can browser available databases, schemas, and tables based on your role permissions. Select the database and schema that contain your assignmentA data source that defines how users are assigned to different variations in an experiment. In Warehouse Native, this data is typically stored in your data warehouse. and metric sourceA data source that defines how metrics are collected and calculated for an experiment. In Warehouse Native, this data is typically stored in your data warehouse. tables.

  5. Specify a results table. Designate a results table where Harness FME will write experiment analysis results. Ensure the following:

    • The table exists in your database.
    • The schema matches the expected format for experiment results (such as key, metric_name, treatment, and more).
  6. Test the connection by clicking Test Connection. Harness FME confirms the following:

    • The credentials and key pair are valid.
    • The warehouse and role are accessible.
    • The specified database and schema exist and are accessible.
  7. Save and activate. Once the test passes, click Save to create the connection.

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

Example Snowflake configuration

SettingExample
VendorSnowflake
Serverxy12345.us-west-2
WarehouseANALYTICS_WH
DatabasePROD_EXPERIMENTS
SchemaPUBLIC
Usernamefme_service_user
RoleDATA_ANALYST
Results TableEXPERIMENT_RESULTS