Replace mode : Delete and insert
How it works
REPLACE Mode follows a two-step process: delete existing data within a defined scope, then insert new data.
This ensures clean data for each synchronization by removing old values before writing new ones.
Technical implementation:
The key distinction is the deletion scope, which differs based on table type.
Visual representation:
Step 1 - DELETE: Remove data matching the scope
Step 2 - INSERT: Add new data
Result: Only new data remains in the scopeDeletion scope by table type
The scope of deletion is critical to understand in REPLACE Mode:
Fact tables (metrics)
Scope: Only the reference date being synchronized
Example with a daily metrics table:
Dimension tables (attributes)
Scope: The entire table
Example with a campaign attributes table:
Use cases
Ideal for:
📊 Fact tables with recalculated metrics
📊 Dimension tables requiring current snapshot only
📊 Aggregated data that may be reprocessed
📊 Data quality fixes
Not suitable for:
❌ Dimension tables requiring historical tracking
❌ High-frequency synchronizations on large tables
❌ Event logs or immutable transactions
❌ Compliance or audit requirements
Best practices
Example: REPLACE with lookback window
Scenario: Google Ads metrics with 7-day attribution window
Without REPLACE mode: You'd have duplicate rows for 2025-01-15 with different conversion values.
With REPLACE mode: Clean data with the most accurate values.
Comparison: Fact tables vs Dimension tables
Deletion scope
Reference date only
Entire table
Data preserved
Other dates untouched
Nothing preserved
Historical tracking
✅ Yes (by date)
❌ No
Typical size
Very large
Small to medium
Sync frequency
Daily
Daily to weekly
Performance impact
Low (partition-level)
Medium to High (full table)
Use case
Metrics with corrections
Current state snapshots
Last updated