Skip to content

Snowflake

TwinCommit lands rows in Snowflake through Snowpipe Streaming into a per-table change table. It then merges them into the target table on a short, configurable interval. Deletes and updates are applied correctly, and the checkpoint is updated in the same transaction as the MERGE.

Supported: Snowflake on AWS, Azure and GCP.

target:
type: snowflake
account: myorg-myaccount
user: TWINCOMMIT_SVC
private_key_file: /etc/twincommit/snowflake_key.p8
role: TWINCOMMIT_ROLE
warehouse: REPLICATION_WH
database: REPLICA
schema: SALES
merge_interval: 30s
CREATE ROLE TWINCOMMIT_ROLE;
CREATE USER TWINCOMMIT_SVC TYPE = SERVICE DEFAULT_ROLE = TWINCOMMIT_ROLE
RSA_PUBLIC_KEY = 'MIIBIjANBgkqh...';
GRANT ROLE TWINCOMMIT_ROLE TO USER TWINCOMMIT_SVC;
GRANT USAGE ON WAREHOUSE REPLICATION_WH TO ROLE TWINCOMMIT_ROLE;
GRANT USAGE ON DATABASE REPLICA TO ROLE TWINCOMMIT_ROLE;
GRANT OWNERSHIP ON SCHEMA REPLICA.SALES TO ROLE TWINCOMMIT_ROLE;