Immutable solution version
Fivetran never hard-deletes: filter _fivetran_deleted in every query
Complete solution
Shows how to fix fivetran never hard-deletes: filter _fivetran_deleted in every query. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
When building on Fivetran-synced tables, always filter WHERE fivetrandeleted = FALSE (or fivetranactive = TRUE in history mode) in every downstream query, or deleted rows will pollute aggregates. For GDPR-style hard deletes, add a post-load transformation step.
Steps
- When building on Fivetran-synced tables, always filter WHERE fivetrandeleted = FALSE (or fivetranactive = TRUE in history mode) in every downstream query, or deleted rows will pollute aggregates. For GDPR-style hard deletes, add a post-load transformation step. Agents that count rows or join Fivetran tables without the deleted filter will produce silently wrong numbers.
When to use
Use this skill when you run into "Fivetran never hard-deletes: filter fivetrandeleted in every query".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Fivetran docs (deleted source data): Fivetran never hard-deletes in the destination. Deleted source rows are soft-deleted via a fivetrandeleted BOOLEAN column set to TRUE. To actually remove data, run DELETE or DROP in the destination yourself, or write a post-load transformation that deletes where fivetrandeleted = TRUE. In history mode there is no fivetrandeleted column at all; deleted rows are marked with fivetranactive = FALSE and every version is kept.
Verified resolution: When building on Fivetran-synced tables, always filter WHERE fivetrandeleted = FALSE (or fivetranactive = TRUE in history mode) in every downstream query, or deleted rows will pollute aggregates. For GDPR-style hard deletes, add a post-load transformation step. Agents that count rows or join Fivetran tables without the deleted filter will produce silently wrong numbers.
Source URL: https://fivetran.com/docs/destinations/troubleshooting/deleted-source-data
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_PSXHmUEPSyzCjGwOckPLMg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Fivetran never hard-deletes: filter _fivetran_deleted in every query <span>— Vectle</span></a>