Skip to content
  • There are no suggestions because the search field is empty.

Deduplication Method (Dataflow)

Applies to
Platform: Microsoft SQL Server · Snowflake · Snowflake dbt · Databricks · Databricks dbt · Fabric Lakehouse · Fabric Warehouse · Oracle

Deduplication Method (DeduplicationMethod) removes duplicate source rows of a dataflow before the loader applies them. Use it when a source can deliver the same key more than once in one load.

Where to set it

Each dataflow of a model object has its own value:

  1. Open Manage Term Mappings of the model object.
  2. In the Overview panel, open the menu of the dataflow and choose Edit.
  3. In the Deduplication group of Edit Dataflow, select a value in Deduplication Method and save.
    Edit Dataflow of a Snowflake Fact dataflow: group Deduplication with Deduplication Method Partition and Sort Order within Partition OFFER_DATE ASC, group Implementation with Fact Load Strategy Truncate Insert and Use Stream cleared, group Technology with Warehouse Placeholder Variable Name

The property is offered on Stage, Store Entity, Store Composite, Entity, Fact, Core Composite, Mart Fact, Mart Composite, Mart Out and all Raw Vault and Business Vault types except PIT, Business PIT, Current View, History View, Business Current View, Business History View and Hierarchy Flatten. Mart Dimension and Mart Hierarchy Flatten do not offer it. On a Stage, validation shows a warning for Distinct and Partition, see No deduplication for Stage objects (Business Rule).

Values and default

  • None (default): no deduplication.
  • Distinct: the deduplication view selects DISTINCT rows over all mapped terms.
  • Partition: the deduplication view numbers the rows of each partition with ROW_NUMBER() and keeps the first row.

The Microsoft SQL Server Stage OpenQuery generator offers None and Distinct only.

Effect on generated output

With Distinct or Partition, each dataflow gets a deduplication view with the suffix _Deduplication. It reads the source view, and the next part of the load reads it. With None, there is none. On dbt, the source model of the object removes the duplicates instead.

The part flow (Generated parts of model objects; legend in the image):

Deduplication detour, top to bottom. With Deduplication Method None the main path runs on. With Distinct or Partition, _Deduplication reads _Source, removes duplicate source rows and rejoins the main path; the next part reads it. A dashed white cylinder next to a part marks the stored rows it compares with (own _Result, or the table without result views); a label on its line names the condition.

On Microsoft SQL Server, the deduplication view of a Store Entity with Partition contains, shortened:

SELECT [BG_Partition].[ARTICLE_NUMBER], ...
FROM (
    SELECT [BG_Source].[ARTICLE_NUMBER], ...
        ,ROW_NUMBER() OVER (PARTITION BY [BG_Source].[ARTICLE_NUMBER]
            ORDER BY [BG_Source].[OFFER_DATE] ASC)
            AS [BG_DeduplicationPartitionOrder]
    FROM [DS_SE_deduplication_partition_se_Source] AS [BG_Source]
) AS [BG_Partition]
WHERE [BG_Partition].[BG_DeduplicationPartitionOrder] = 1

How Partition builds the partition

  • Objects with business keys partition by the business keys.
  • Satellites and Link Satellites partition by their foreign keys, which carry the business keys of the Hub or Link.
  • Objects without business keys partition by all non-default terms. Validation shows a warning for them, see Partition deduplication without business keys (Business Rule).

The rows of a partition are ordered by Sort Order within Partition. Without it, they are ordered by the partition terms, so any of the duplicates can be kept.

Example

The Store Entity above has the business key ARTICLE_NUMBER, Deduplication Method Partition and Sort Order within Partition OFFER_DATE ascending. One load delivers three rows for article 1001 and one for article 1002:

ARTICLE_NUMBER PRODUCT_NAME PRICE_EUR OFFER_DATE
1001           Garden hose  24.90     2026-10-15
1001           Garden hose  19.90     2026-10-01
1001           Garden hose  22.50     2026-10-08
1002           Watering can 12.00     2026-10-05

The Store Entity table then holds one row per article, the one with the earliest offer date:

ARTICLE_NUMBER PRODUCT_NAME PRICE_EUR OFFER_DATE
1001           Garden hose  19.90     2026-10-01
1002           Watering can 12.00     2026-10-05

Related articles