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.
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.
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.
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.