I have a custom table that I am trying to import data into. When importing into my staging table, I get 3 separate records. When importing from staging to target, it will create 1 record (if there are no records) and then 'update' that record twice. If there is already a record in the target, it will update that record 3 times.
I'm fairly certain this has something to do with this table(target) being a custom table, however, I can't figure out why the records always update. They are unique records.
*This post is locked for comments
Thanks André! the relation between DMF staging table and target table solved my problem :)
Thank you Andre! It was the relationship between the staging and target tables that I was missing. Thank you!!
Like Andre says, it seems like DMF has trouble finding the specific records you are trying to insert/update. The result is that the first record in the target table is always found.
DMF uses the relations on the staging table to find records, if the exist. It does this by building a query in code with the DMFStaging table as base and then adds the related table using the relation. If the related record can not be found you will get an insert and if it can be found you will get an update. But if there is no relation at all, the first record of the target table will be found every time and this seems to be your problem.
Hi Bradly,
You have to ensure your DMFstaging table has a primary index including the fields DefinitionId, ExecutionId and the primary key of the target table.
Also check if the DMF staging table has a relation with the target table on your primary field. This might be your problem.
Check e.g. the relations on an existing DMF staging table.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156