Developer forum

Forum » Integration » ForeignKey conflict when using double underscores (__)

ForeignKey conflict when using double underscores (__)

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have some data containing double underscores (__) as follows: ProductID, ProductCategoryId, ProductCategoryFieldId, GroupId.

I am trying to export and import this data into DW. Most of the data can be imported correctly but I get some weird ForeignKey conflict message when trying to import CategoryId into EcomGroups and also when trying to import data in ProductCategoryFieldValue. The error is thrown when trying to move data from temporary table to the destination tables

The import in EcomProductCategory,EcomProductCategoryField and EcomProducts works pretty well but the import for EcomGroups and ProductCategoryFieldValue fails.

I have checked the TempTable created during the DataIntegration job and the data looks very well. I am not aware of any hard restrictions when using double underscores but I may be very wrong. 

Does anybody know any reason why I get these Foreign key violation messages?

Thank you,

Adrian


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Adrian,
can you point what exactly error message do you have? Also it is strange that it occurs for the EcomProductCategoryFieldValue table as this table has no FK constraints.
The EcomGroups only has only one constraint to the EcomLanguages LanguageId field.
What providers are used?
BR, Dmitrij

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Dmitrij,

I am using XML provider as source and Dynamicweb provider as destination.
I have also tried JSON provider as source and I have also tried EcomProvider as destination.

I have received different error messages depending on the tables I am importing into.

Just to validate if the data is correct, I have removed the double underscores from my data and all error messages are gone.

This leads me to believe that somewhere in the process (probably when moving data from temporary tables to destination tables) something goes wrong.

I have attached my XML here so you can try it on your own. You have everything except for Products. Maybe I am missing something

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

My attachment did not work. Probably because of its size

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Can not get it reproduced, made xml->dw provider job with those tables mappings and default column mappings that were added automatically by DW, so no changes, no additions, no scripts etc:

And then run the job 2 times and both were executed without any errors.
So maybe you have some custom mappings or custom table scripts or some custom notification subscribers or conditions that maybe failing?

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Dmitrij,

Nothing that I am aware of. But I can check that path.

Thank you.
Adrian

 

You must be logged in to post in the forum