Incremental Syncs
๐ Incremental Syncs โ Syncing Only New or Updated Data in AudienceSync
๐ง Overview
Incremental syncs transfer only the data that has changed since the last syncโthis includes new or updated records, minimizing data transfer and reducing redundancy.
This method avoids resending previously synced data by using a unique primary key and a reliable update-tracking field (like updated_at
).
๐ Note: The first incremental sync behaves like a full refresh because all data is considered new.
๐ก Why Use Incremental Syncs?
- Minimizes the amount of data being transferred.
- Reduces processing time.
- Prevents duplication in the destination.
- Ideal for frequent syncs with dynamic data.
๐ How It Works
- A unique primary key (set during model creation) is used to identify each row.
- AudienceSync checks for changes using a column like
updated_at
,modified
, ortimestamp
.
- Only new or modified rows are included in each sync.
- Destination data is updated or appended as needed.
๐ Example Scenario
๐๏ธ Initial State (Source Table)
Name | Plan | Updated At |
Charles Beaumont | freemium | 6789 |
Eleanor Villiers | freemium | 6790 |
๐ First Sync
Only Charles has a newer version of his record:
Name | Plan | Updated At |
Charles Beaumont | freemium | 6791 |
Destination after sync:
Name | Plan | Updated At |
Charles Beaumont | freemium | 6791 |
Eleanor Villiers | freemium | 6790 |
๐ Second Sync
Both users upgrade to a paid plan:
Name | Plan | Updated At |
Charles Beaumont | paid | 6795 |
Eleanor Villiers | paid | 6795 |
Destination after sync:
Name | Plan | Updated At |
Charles Beaumont | paid | 6795 |
Eleanor Villiers | paid | 6795 |
Did this answer your question?
๐
๐
๐คฉ
Last updated on August 6, 2021