web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

DMF export incremental push , how to avoid duplicate records in staging table

(0) ShareShare
ReportReport
Posted on by 3,926

Hello All,

I have a custom entity for which I need to set up a recurring job that would export data into a DB on daily basis.

For this, every day when the job is run, I only need the delta records to be pushed into the target DB. However, when I try to run the incremental push, all the records get loaded into the staging table(this creates duplicate records in staging), although, since the change tracking is enabled, the target DB does not reflect any duplicate records.

Since all data gets pushed into the staging table, and the volume of data is huge, I want to only bring in the delta records onto staging, so that the data push happens clear cut.

The staging table does have an index that includes a composite key of Def Group, execution id, and 3 other fields that are unique to the record.

Is there any solution to avoid the data duplication in the staging table in D365 FO?

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Could you elobare your problem, please?

    Are you saying that change tracking doesn't work at all? Are you sure you've set it up correctly?

    Do you realize that the first export is always full? Also, if your next export it later then for how long SQL Server stores change tracking data (three days by default, I believe), then it can't say what has changed and it must export everything.

    Note that your problem doens't seems to be related to duplicates in the staging table. That you can have the same record mutliple times there (with different execution ID) is completely normal (e.g. if you run a full export, update a record and run an incremental one). It's nothing wrong in itself.

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Arun,

    You mentioned export into DB. Do you mean BYOD or you export data to XML, CSV, etc. and later it moved by integration to DB?

    Are you using staging because of the virtual fields or is there any other reason?

  • Suggested answer
    Cristina Perez Profile Picture
    on at

    Hello Arun, hope you are fine! I understand that your business scenario is export to BYOD using your custom data entity. If you have enabled change tracking and you are using incremental push (docs.microsoft.com/.../export-entities-to-your-own-database, not all records will be exported except first export that will be full push. In case you are having issue, I would suggest you to check the Change tracking setup for your custom data entity (docs.microsoft.com/.../export-entities-to-your-own-database and your custom data entity from development point of view to see if everything is correct. As recommendation I encourage you to run job history clean up as well (docs.microsoft.com/.../data-import-export-job. You can test as well how the export works if you skip staging and you can always compare with similar standard data entity.

    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans