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 :
Microsoft Dynamics AX (Archived)

DIXF: when is executed postGetStagingData()?

(0) ShareShare
ReportReport
Posted on by 427

Greetings,

We are using AX 2012 r3 cu8.

I created a custom entity with DIXF.

I want to add some advance filtering on the staging data extracted from AX to reduce the number of rows exported to a csv files. The standard AX filtering applied to the query is not sufficient.

My understanding was to override the postGetStagingData() method on my custom entity class; it is supposed to be executed after the execution of the SSIS package.

Well, this method does not seem to be called. Or more probably... my understanding is wrong! :)

Or one needs to do more than overriding the method; i.e. something else must be changed/coded in another object (entity table? entity query?)

Regards,

Eric

*This post is locked for comments

I have the same question (0)
  • Mea_ Profile Picture
    60,284 on at

    Hi Eric Lepage,

    It is called by DMFGenerateSSISPackage.generateStagingData() method, you can find next line

    DictClass.callObject(methodStr(DMFEntityBase,postGetStagingData), entityClass, _dmfDefinitionGroupExecution)

    and put breakpoint there to see if it it gets executed, it should be last step after SSIS import data to staging table.

  • Arkadia2 Profile Picture
    427 on at

    Hello ievgen,

    Thanks for the reply.

    Yeah, I did set a breakpoint, at the very beginning of DMFGenerateSSISPackage::generateStagingData() to be sure that I would trap the method being called. But it is not called. Which is what lead me to think my assumptions were wrong about postGetStagingData() usage.

    Maybe it is not called when using this function in processing group:

    1) Select the group and choose Get staging data

    ProcessGroup_2D00_SelectRun282x128.png

    2) use the Select button to apply some filters then run the job, not in batch of course.

    ProcessGroup_2D00_SelectRun282x128.png

    Information is surprisingly sparse on DIXF if one wants to use customize entity.

    Well, if you have other ideas, please let me know.

    Regards,

    Eric

  • Mea_ Profile Picture
    60,284 on at

    Do you have "Execute Business Operation In CIL" disabled in user parameters ?

  • Arkadia2 Profile Picture
    427 on at

    Yes, it is disabled.

  • Arkadia2 Profile Picture
    427 on at

    I'm pulling data from AX to write it to staging. It does not seem to allow postProcessing to filter data extracted. I am looking atDMFStagingWriter::execute(), around line 293:

           if (definitionGroupExecution.FilePath || definitionGroupExecution.QueryForODBC)

           {

               [recCountCon, errorCountCon, entityCon, exceptionFound,stagingLogRecId] = DMFGenerateSSISPackage::generateStagingData(definitionGroupExecution, dmfEntity.EntityType, _batchId, _runOnService);

           }

    There is no filepath when coming from AX as far as I can see.

    If anyone has an idea how I could write some advanced filtering when creating staging data from AX, I'm open to suggestions! :)

    Regards,

    Eric

  • Arkadia2 Profile Picture
    427 on at

    In this thread:

    community.dynamics.com/.../237965

    The original poster seems to have succeeded in implementing the getpostProcessingData, but he is reading in data from a CSV file.

  • Verified answer
    Arkadia2 Profile Picture
    427 on at

    I think I *may* have found a way to postprocess the data. I will test it furthermore and try heavier data load.

    In my custom entity class, I override the copyTargetToStaging() method. At this point, the staging has been loaded in the entity table and the entityId is provided as one of the parameter. So it is possible to write more advanced clean-up code in there.

    I'll come back to this thread later on... but of course if anyone sees a reason NOT TO perform data clean-up in copyTargetToStaging(), please let me know! :)

    Regards,

    Eric

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans