Openflow Connector for Oracle: Set up Snowflake

Note

The Openflow Connector for Oracle is subject to the terms of service in the Openflow Connector for Oracle Addendum.

This topic describes how to set up your Snowflake environment for the Openflow Connector for Oracle.

Snowflake account setup

As an Openflow administrator, perform the following tasks for this connector. With the default SNOWFLAKE_MANAGED authentication strategy, the runtime’s execute-as role is the identity the connector uses to access Snowflake, so you grant these privileges to that role.

Note

If you’re deploying the connector in Openflow - BYOC Deployments and using the KEY_PAIR authentication strategy instead of the recommended SNOWFLAKE_MANAGED, you’ll also grant this same execute-as role to a service user rather than relying on the runtime’s managed token. See Set up key-pair authentication for Openflow - BYOC Deployments to create the service user.

  1. Create a new destination database for the replicated data, and grant the execute-as role USAGE and CREATE SCHEMA on it. Keep this database separate from the database that holds your Openflow infrastructure objects, such as the runtime, connector, and secrets.

    Using a dedicated destination database for each connector is safest because the connector creates destination schemas and tables based on the source schema and table names. Multiple connectors can use the same destination database, but you must prevent name collisions. To change how destination schemas are named, for example to replicate several source databases into one destination database, set the Destination Schema Pattern parameter (gen 1) or the Destination Schema Strategy parameter (gen 2) before the connector starts ingesting data. You can’t change it afterward.

    CREATE DATABASE IF NOT EXISTS <destination_database>;
    
    GRANT USAGE ON DATABASE <destination_database> TO ROLE OPENFLOW_<RUNTIME_NAME>_EXECUTE_AS_RL;
    GRANT CREATE SCHEMA ON DATABASE <destination_database> TO ROLE OPENFLOW_<RUNTIME_NAME>_EXECUTE_AS_RL;
    

    If your source has a schema named public and you use case-insensitive object identifier resolution, the connector maps it to the existing PUBLIC schema. Grant the execute-as role privileges on PUBLIC, and make sure there are no tables in it whose names match source tables:

    GRANT USAGE, CREATE TABLE, CREATE STREAM ON SCHEMA <destination_database>.PUBLIC
      TO ROLE OPENFLOW_<RUNTIME_NAME>_EXECUTE_AS_RL;
    
  2. Designate a warehouse for the connector to use, and grant the execute-as role USAGE and OPERATE on it. Start with the XSMALL warehouse size, then experiment with size depending on the number of tables being replicated and the amount of data transferred. Large table numbers typically scale better with multi-cluster warehouses rather than the warehouse size.

    CREATE WAREHOUSE <ingest_warehouse>
      WITH
        WAREHOUSE_SIZE = 'XSMALL'
        AUTO_SUSPEND = 300
        AUTO_RESUME = TRUE;
    
    GRANT USAGE, OPERATE ON WAREHOUSE <ingest_warehouse> TO ROLE OPENFLOW_<RUNTIME_NAME>_EXECUTE_AS_RL;
    
  3. Snowflake deployments only: Make sure this connector’s source host and port are permitted by a network rule that your runtime’s external access integration (EAI) allows.

    The EAI itself belongs to the runtime, not to this connector. You create it once, attach it to the runtime, and grant the execute-as role USAGE on it. For those steps, see Creating network rules and external access integrations. What is specific to this connector is getting its source host into a rule that the EAI references.

    The rule takes the source’s host and port as a single value, such as db.example.com:<port>. That’s the host and port from the connector’s connection URL, without the jdbc: scheme, the driver name, or the database path.

    BYOC deployments handle outbound connectivity in the cloud environment and don’t use EAIs or network rules.

Next steps

Configure the connector.