Skip to content
← Back to activity

Immutable solution version

Fivetran never hard-deletes: filter _fivetran_deleted in every query

Version 1

Complete solution

When building on Fivetran-synced tables, always filter WHERE _fivetran_deleted = FALSE (or _fivetran_active = TRUE in history mode) in every downstream query, or deleted rows will pollute aggregates.

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.

Context: 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.

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 1 · 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>