Contents

Chapter 1

Features

This chapter covers the core features and capabilities of Data Sync Tool.

Features

  • Bidirectional sync — Sync changes in both directions between source and target
  • Delta detection — Content hashing identifies what actually changed
  • 5 conflict strategies — source_wins, target_wins, newest, merge, manual
  • Automatic backups — Creates timestamped backups before modifying files
  • Audit logging — Every sync operation logged with timestamps and details
  • Dry-run mode — Preview what would change without modifying files
  • JSON & CSV support — Works with both common data formats
  • Primary key matching — Match records across files using any field

Requirements

  • Python 3.10+
  • No external dependencies (stdlib only)
Chapter 2

Quick Start

Follow this guide to get Data Sync Tool up and running in your environment.

Quick Start

bash
# 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

Configuration Reference

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"
}

CLI Options

FlagDefaultDescription
--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
--strategysource_winsConflict resolution strategy
--bidirectionalfalseEnable bidirectional sync
--timestamp-field—Field name for newest strategy
--no-backupfalseSkip creating backup files
--dry-runfalseShow changes without modifying files
--audit-logsync_audit.jsonAudit log file path
--log-levelINFOLogging level

Conflict Strategies

StrategyBehavior
source_winsSource always overwrites target on conflict
target_winsTarget is preserved on conflict
newestRecord with the latest timestamp wins (requires --timestamp-field)
mergeField-level merge — non-null source fields overwrite target
manualConflicts logged but not resolved automatically
Chapter 3
🔒 Available in full product

Output

Chapter 4
🔒 Available in full product

License

You’ve reached the end of the free preview

Get the full Data Sync Tool and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $19 →
📦 Free sample included — download another copy for the full product.
Data Sync Tool v1.0.0 — Free Preview