DataTongs grips reference data from your live database and produces synchronization scripts — one SQL file per table, ready for schema packages or direct deployment.
Try it hands-on
In schema-as-code workflows, SchemaTongs and SchemaQuench handle structure: extraction and deployment of tables, views, procedures, and functions. But database schemas don't live in isolation — they travel with reference data. Lookup tables, configuration rows, seed data, and status enumerations need the same version control and deployment lifecycle as the schema itself. DataTongs fills that gap.
DataTongs connects to a live database, reads your configured reference tables, and writes one synchronization script per table to your output path. On SQL Server and PostgreSQL, these scripts use MERGE statements — conditional inserts and updates in a single atomic operation. On MySQL, DataTongs emits INSERT ... ON DUPLICATE KEY UPDATE scripts, MySQL's native syntax for idempotent upserts. The output is self-contained: drop a script into a schema package's Table Data folder and SchemaQuench will execute it during deployment, or run it directly against any compatible target to synchronize reference data in isolation.
One DataTongs executable runs on three platforms: SQL Server, PostgreSQL, and MySQL. The tool works identically on all three; what changes is the adapter underneath. Set your Source:Platform value to SqlServer, PostgreSQL, or MySQL and DataTongs picks the right connection protocol, platform metadata APIs, and sync-script dialect.
DataTongs also configures how extracted data flows into your deployment pipeline. Pass the --ConfigureDataDelivery flag and DataTongs writes a DataDelivery block into each table's JSON schema file alongside the extracted .tabledata content file. The DataDelivery block captures delivery settings — which columns to match on, merge type, any filters, and platform-specific trigger or rule handling — so SchemaQuench knows exactly how to synchronize that data during deployment. This turns the workflow into a single integrated pipeline: SchemaTongs extracts your schema structure, DataTongs extracts your reference data and wires it into the delivery configuration in one pass, and SchemaQuench deploys both together. See SchemaQuench for how the deployment side reads and executes these configured data deliveries.
DataTongs generates platform-native scripts: SQL Server and PostgreSQL emit MERGE statements; MySQL emits INSERT ... ON DUPLICATE KEY UPDATE. The same extraction, three engines, three dialects. A SQL Server DataTongs output is not compatible with MySQL — run each script against its target platform.
Each platform reference covers configuration, the platform-native sync-script syntax, and the extraction settings DataTongs exposes for that engine.
Reference for DataTongs on SQL Server. Configuration, MERGE script emission, Source, Tables, and ShouldCast settings including DisableTriggers, MergeUpdate, and MergeDelete.
Reference for DataTongs on PostgreSQL. Configuration, MERGE statement emission (PostgreSQL 15+ syntax), Tables entries with KeyColumns and optional Filter, and synchronization behavior.
Reference for DataTongs on MySQL. Configuration, INSERT ... ON DUPLICATE KEY UPDATE script emission, Source + Tables + KeyColumns, and MySQL-native synchronization semantics.
Each platform has a 15-minute hands-on walkthrough focused on extraction. You'll configure a source connection, run DataTongs against a live demo database, and review the generated synchronization scripts.
Hands-on 15-minute walkthrough using the Northwind and Chinook demo databases. Configure the source connection, run DataTongs, and review the generated MERGE scripts for reference tables.
Hands-on 15-minute walkthrough using the Northwind and Sakila demo databases. Configure the source connection, run DataTongs, and inspect the generated MERGE scripts and synchronization output.
Hands-on 15-minute walkthrough using the Northwind and Chinook demo databases. Configure the source connection, run DataTongs, and review the generated INSERT ... ON DUPLICATE KEY UPDATE scripts.