Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

DMF import with blank source file columns for mandatory and entity key fields

(1) ShareShare
ReportReport
Posted on by 390
Hi,
 
I have 2 queries regarding the mandatory and entitykey fields during DMF import:
 
  • Do we always need to fill the mandatory fields defined at entity level in the source file coming from middleware. I tried setting value through code in postGetStagingData but got error The column ABC in entity XYZ has incorrect data. Please correct the data and try the import again. Can we not have a blank value in the file for mandatory field
  • I used the same method postGetStagingData  to also update a value in staging table for entity key value which was also blank in the source file but this succeeded. Here I have a doubt that why do we need to keep this column in the file when it has no value and we update the staging table field with code. I tried removing the column from file but then the import failed. Please help me understand why we need that column in file.
Thanks!!
  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,419 Super User 2024 Season 2 on at
    DMF import with blank source file columns for mandatory and entity key fields
    Hi Dev,

    Apologies for a late reply. I just found your question back. Have you solved your issue already?
    I'm not aware of all the details of your data entity. Entity key fields should always be part of the source file. 
  • Dev Profile Picture
    Dev 390 on at
    DMF import with blank source file columns for mandatory and entity key fields
    Thanks Andre, please answer the second part of my question (mentioned below) and for the first part -  So the field which is mandatory at entity/staging level has to be filled in the source file and cannot be added later through the code?
     
    • I used the same method postGetStagingData  to also update a value in staging table for entity key value which was also blank in the source file but this succeeded. Here I have a doubt that why do we need to keep this column in the file when it has no value and we update the staging table field with code. I tried removing the column from file but then the import failed. Please help me understand why we need that column in file.
     
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,419 Super User 2024 Season 2 on at
    DMF import with blank source file columns for mandatory and entity key fields
    Hi Dev,
     
    There are multiple levels where you can set fields to be mandatory. One is on the data entity, a second on the staging data, and also there can be mandatory fields on the target table. In case it is mandatory on the data entity or staging table, you need to provide a value as SSIS is used to fill the staging tables. In case you have only one default value, you can change the source to staging mapping and set a default value for this field. If the value depends on conditions, you can use your current coding and also set another default value. 

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,419 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,492 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans