Google BigQuery target
TwinCommit loads Google BigQuery by streaming changes through the Storage Write API into a per-table staging table. It then runs a MERGE into the target on a short interval. The MERGE and the checkpoint update run in one multi-statement transaction, so delivery is exactly-once.
Supported: BigQuery (all editions and regions).
Configuration
Section titled “Configuration”target: type: bigquery project: acme-analytics dataset: replica location: US credentials_file: /etc/twincommit/bq-sa.json # or workload identity merge_interval: 60s partition_by: "" # optional: column for time partitioning of new tablesHow apply works
Section titled “How apply works”- Changes are appended to
replica._tc_stage_<table>with the Storage Write API’s committed-type streams. - Every
merge_interval, TwinCommit runsBEGIN TRANSACTION; MERGE ...; UPDATE checkpoint ...; COMMIT TRANSACTION;. - Applied staging rows are deleted in the same transaction.
Grant the service account:
roles/bigquery.dataEditoron the target datasetroles/bigquery.jobUseron the project