Amazon Redshift target
TwinCommit loads Amazon Redshift by staging each micro-batch as Parquet in S3. It then runs COPY into a staging table and a MERGE into the target. The MERGE and the checkpoint update run in one Redshift transaction, so delivery is exactly-once.
Supported: Amazon Redshift (RA3) · Redshift Serverless.
Configuration
Section titled “Configuration”target: type: redshift dsn: postgres://twincommit:${REDSHIFT_PASSWORD}@analytics.abc123.us-east-1.redshift.amazonaws.com:5439/dev schema: replica s3_staging: s3://acme-twincommit-staging/redshift/ iam_role: arn:aws:iam::123456789012:role/twincommit-redshift-copy merge_interval: 60sHow apply works
Section titled “How apply works”- Changes are accumulated for up to
merge_intervaland written as Parquet tos3_staging. COPYloads the batch into a temporary staging table.MERGEapplies inserts, updates and deletes using the latest change per key, then the checkpoint is updated and the transaction commits.- Staged files are deleted.
Grants
Section titled “Grants”CREATE USER twincommit PASSWORD '********';GRANT CREATE ON DATABASE dev TO twincommit;GRANT ALL ON SCHEMA replica TO twincommit;The IAM role needs s3:GetObject and s3:ListBucket on the staging prefix. TwinCommit itself needs s3:PutObject and s3:DeleteObject.