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

  1. A unique primary key (set during model creation) is used to identify each row.
  1. AudienceSync checks for changes using a column like updated_at, modified, or timestamp.
  1. Only new or modified rows are included in each sync.
  1. 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