A TwinCommit pipeline is one YAML file that names a source, a target and the tables to replicate. Every value can reference environment variables with ${VAR}, so credentials never need to be stored in the file.
password : ${DB2_PASSWORD}
dsn : postgres://twincommit:${PG_PASSWORD}@pghost:5432/analytics
- source : DB2INST1.ORDERS
- source : DB2INST1.CUSTOMERS
max_txn_memory_bytes : 268435456
spill_dir : /var/lib/twincommit/spill
token : ${TWINCOMMIT_CONTROL_TOKEN}
Key
Type
Description
type
string
oracle, mysql, sqlserver, postgres, mongodb, db2, db2zos, cassandra, mariadb or saphana
connection keys
Depend on type. See the source pages , for example MySQL , MongoDB or Db2 LUW .
Key
Type
Description
type
string
Relational: oracle, mysql, sqlserver, postgres, db2, mariadb, saphana. Warehouse and lakehouse: snowflake, databricks, synapse, redshift, bigquery, spark, hive. Data lake: adls, s3, gcs. NoSQL, search and streaming: mongodb, cassandra, redis, elasticsearch, kafka
connection keys
Depend on type. See the target pages .
A list of tables to replicate.
Key
Type
Default
Description
source
string
required
SCHEMA.TABLE on the source
target
string
lower-cased source name
schema.table on the target
exclude_columns
list
[]
Columns not to replicate, such as unsupported LOB types or sensitive data
Key
Type
Default
Description
state_schema
string
twincommit
Target schema for checkpoint and table-state tables
metrics_addr
string
:9108
Address for /metrics, /status and /control
spill_dir
path
/tmp
Where transactions over max_txn_memory_bytes are spilled
Key
Type
Default
Description
max_rows
int
5000
Apply once this many row changes are pending
flush_interval
duration
1s
…or after this long
poll_interval
duration
500ms
Wait between log reads when caught up
max_txn_memory_bytes
int
268435456 (256 MiB)
Larger transactions spill to spill_dir
Lower flush_interval for lower latency; raise max_rows for higher throughput on targets with expensive commits, such as lakehouse targets.
Key
Type
Default
Description
token
string
none
Bearer token required on /status and /control
allow_writes
bool
false
Allow start, stop and re-snapshot through /control, used by the MCP server
protect_metrics
bool
false
Also require the token on /metrics
${VAR} is replaced with the value of the environment variable VAR when the file is loaded. An unset variable becomes an empty string, and twincommit check warns about it.