Unify and manage your data

Configure Zero Copy Data integration with Snowflake using APIs

Learn how to set up a secure connection to Snowflake and map external interaction tables using the Reltio API.

Before you begin:

  • You must have the ROLE_ADMIN or equivalent privileges.
  • The target Snowflake warehouse must be accessible and configured for key-based authentication.
  • You must have Snowflake user credentials and schema access.

This task shows how to use the Reltio APIs to configure a connection to Snowflake, authenticate securely, and map an external table to an interaction type in Intelligent 360.

  1. Create the Snowflake connection.

    Send a POST request to register a Snowflake connection:

    POST {Url}/reltio/api/tenants/{tenantId}/interactions/database-configs/
    

    Example request body:

    {
      "connection_name": "sales-data",
      "database_type": "SNOWFLAKE",
      "snowflake_config": {
        "accountId": "myaccount",
        "databaseName": "customerdb",
        "schemaName": "public",
        "warehouse": "my_warehouse",
        "role": "READER_ROLE",
        "region": "us-west-2",
        "connectionProperties": {
          "queryTimeout": 3000,
          "maxPoolSize": 5
        }
      }
    }
  2. Store Snowflake credentials and retrieve the public key.

    Send a POST request to store credentials and receive the public key:

    POST {Url}/reltio/api/{tenantId}/interactions/credentials/snowflake/sales-data
    

    Example request body:

    {
      "username": "reltio_svc"
    }

    The response will include a public key and an SQL statement like:

    ALTER USER reltio_svc SET RSA_PUBLIC_KEY='<public-key>';
    Run this statement in your Snowflake account to complete the authentication setup.
  3. Grant required permissions in Snowflake.

    Execute the following SQL in Snowflake to assign read-only access:

    
    GRANT USAGE ON WAREHOUSE my_warehouse TO ROLE READER_ROLE;
    GRANT USAGE ON DATABASE customerdb TO ROLE READER_ROLE;
    GRANT USAGE ON SCHEMA public TO ROLE READER_ROLE;
    GRANT SELECT ON TABLE transactions TO ROLE READER_ROLE;
    GRANT ROLE READER_ROLE TO USER reltio_svc;
              
  4. Map the external table to an interaction type.

    Use the PUT endpoint to define the mapping between the Snowflake table and Reltio interaction type:

    PUT {Url}/reltio/api/tenants/{tenantId}/zero-copy-interactions/mappings/{connectionId}
    Example request body:
    {
      "interaction_type": "sales",
      "table_name": "transactions",
      "order_by_column": "TRANSACTIONTIME",
      "timestamp_column": "TRANSACTIONTIME",
      "member_mappings": [
        {
          "member_type": "Products",
          "column_name": "ITEMCODE"
        }
      ],
      "attributes": [
        {
          "attribute_display_name": "customerId",
          "column_name": "USERID"
        },
        {
          "attribute_display_name": "country",
          "column_name": "COUNTRY"
        }
      ]
    }
    

    This configuration enables federated query of the interaction data and maps it into Reltio Intelligent 360TM timelines.

Your Snowflake connection and mapping are now configured. Reltio can federate interaction data directly from Snowflake into Reltio Intelligent 360TM in real time.