This chapter covers the core features and capabilities of Data Sync Tool.
source_wins, target_wins, newest, merge, manualFollow this guide to get Data Sync Tool up and running in your environment.
# One-way sync (source overwrites target conflicts)
python src/data_sync_tool.py --source users_a.json --target users_b.json --key id
# Bidirectional sync with "newest" strategy
python src/data_sync_tool.py --source a.csv --target b.csv --key email \
--strategy newest --timestamp-field updated_at --bidirectional
# Dry run — see what would happen
python src/data_sync_tool.py --source a.json --target b.json --key id --dry-run
# Full config file
python src/data_sync_tool.py --config examples/sync_config.json{
"source": "data/customers_primary.json",
"target": "data/customers_replica.json",
"key_field": "customer_id",
"strategy": "newest",
"timestamp_field": "updated_at",
"bidirectional": true,
"create_backups": true,
"audit_log": "sync_audit.json"
}| Flag | Default | Description |
|---|---|---|
--source, -s | — | Source data file (JSON or CSV) |
--target, -t | — | Target data file (JSON or CSV) |
--key, -k | — | Primary key field for matching records |
--config, -c | — | Config file (JSON) for advanced sync |
--strategy | source_wins | Conflict resolution strategy |
--bidirectional | false | Enable bidirectional sync |
--timestamp-field | — | Field name for newest strategy |
--no-backup | false | Skip creating backup files |
--dry-run | false | Show changes without modifying files |
--audit-log | sync_audit.json | Audit log file path |
--log-level | INFO | Logging level |
| Strategy | Behavior |
|---|---|
source_wins | Source always overwrites target on conflict |
target_wins | Target is preserved on conflict |
newest | Record with the latest timestamp wins (requires --timestamp-field) |
merge | Field-level merge — non-null source fields overwrite target |
manual | Conflicts logged but not resolved automatically |
Get the full Data Sync Tool and unlock everything.
Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.
Access all interactive tools with complete data, all workload profiles, and the full scenario library.
Downloadable source code, configuration files, and working examples from every chapter.
Free updates for life. Every new chapter, tool, and improvement included.