Forum Discussion
Duplicate rows in dataflow
- 1 year ago
Hi tomperro
Thanks for reaching out to Fabric Community.Your dataflow is currently appending new rows each time, which is why you end up with duplicates.
Here are Best approaches pick the one that best fits your scenario:
-
In your Dataflow destination settings (Gen2), disable the automatic settings and under Update methods choose Replace. This will truncate and reload the target table on every refresh, eliminating duplicates completely. Reference link: https://learn.microsoft.com/en-us/fabric/data-factory/dataflow-gen2-data-destinations-and-managed-settings
- Stage the refreshed data in a temporary table, then run a T-SQL MERGE statement against your warehouse target using the Salesforce record ID as the key. This upserts new rows and updates existing ones without duplication
Reference link: https://learn.microsoft.com/en-us/sql/t-sql/statements/merge-transact-sql?view=sql-server-ver16
Choose the method that aligns with your performance and audit requirements.
If this answer solves your issue, please give us a Kudos and mark it as Accepted Solution.
Kind regards,
Community Support Team _ C Srikanth. -
Hi tomperro,
Glad you got it sorted with v-csrikanth's solution - Replace mode in Dataflow Gen2 destination is the cleanest fix for the append-duplicate pattern. T-SQL MERGE is the right call if you also need to capture updates to existing records, not just inserts.
For anyone landing here from search and looking to avoid the dataflow staging layer entirely for Salesforce data, Power BI Connector for Salesforce on AppExchange pulls Salesforce data directly into Power BI without dataflow intermediation:
Why it might fit:
- Direct Salesforce → Power BI path, no dataflow append/replace logic to manage
- Server-side filtering on the Salesforce side - only relevant rows pulled, not the full object
- No 2,000-row limit on reports
- Supports custom fields, custom objects, and joined reports
- 30-day free trial
- Setup docs: https://metricasoftware.com/docs/salesforce/
- Responsive support if you get stuck: https://metricasoftware.com/docs/salesforce/contact-support/
Happy to set up a quick demo if it'd help. Just reach out via the support link.
Cheers,
Metrica Team.