Swan Sauvegrain
07/13/2026, 8:21 AMkapa.ai
07/13/2026, 8:21 AMWITH deduped AS (
SELECT *, ROW_NUMBER() OVER (
PARTITION BY primary_key
ORDER BY _airbyte_extracted_at DESC
) AS rn
FROM temp_table
)
SELECT * FROM deduped WHERE rn = 1
The result is then merged into the final table.
Key points • Why use Overwrite + Deduped over plain Overwrite? Full Refresh syncs can be resumed after transient errors, which can introduce duplicate records. The deduped variant eliminates those duplicates, whereas plain Overwrite does not. [Full Refresh Overwrite+Deduped]
• Trade-off: Deduplication incurs additional warehouse compute costs.
• Destination-specific behavior: Some destinations implement deduplication differently. For example, ClickHouse uses its ReplacingMergeTree engine rather than a SQL MERGE statement, and requires adding FINAL to queries to guarantee deduplicated results at query time. [ClickHouse Destination] 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.Swan Sauvegrain
07/13/2026, 8:23 AMkapa.ai
07/13/2026, 8:23 AMConfiguredAirbyteStream schema, cursor_field is required only when sync_mode is incremental. For full refresh modes, it would be ignored at the source level. [ConfiguredAirbyteStream]
• The Full Refresh Overwrite + Deduped docs describe deduplication as "sorting the data using the cursor field and keeping only the latest de-duplicated data row," but don't explicitly explain how that cursor field is selected in this mode. [Full Refresh Overwrite+Deduped]
For the UI, the docs do note that you can modify a cursor or primary key per stream by navigating to the relevant stream in the Schema tab, but this guidance is given in the context of incremental sync modes. [Configuring Schemas]
I'd recommend checking the Airbyte UI directly when configuring a Full Refresh | Overwrite + Deduped stream to see if a cursor field option is presented, or consulting the Airbyte documentation for more details. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.