Developer forum

Forum » Integration » Importing Same Variant ID to Different Variant Groups

Importing Same Variant ID to Different Variant Groups

Aye Nyein Myat Dynamicweb Employee
Aye Nyein Myat
Reply

Dear All,

We have one requirement to import same variant code (variantID) for two different variant group (shoe size and cloth size). I created import data integration job and tried to change the primary key as the combined keys of Variant Group and Variant ID on Destination table. But it is still having the error message of Primary key. Could you please advise how can I achieve this data import?

Best Regards,
Nyein


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi,
it looks like you don't have a problem with VariantGroups but with VariantOptions. Could you also edit the VariantOption mapping and
point the Key columns to: VariantOptionId (default) and VariantOptionGroupId?
BR, Dmitrij

Votes for this answer: 2
 
Aye Nyein Myat Dynamicweb Employee
Aye Nyein Myat
Reply

Hi Dmitrij,

Noted with Thanks. I have updated to point key columns with VariantOptionID, VariantOptionGroupID on EcomVariantOptions table and tried import again.
But I am still facing the same error. Please refer to the below screenshots. Kindly advise.

Best Regards,
Nyein

 
Aye Nyein Myat Dynamicweb Employee
Aye Nyein Myat
Reply

Hi Dmitrij and All,

I have already tried as per the suggestion but I am still facing the same error message as I mentioned on  my above comment.
Kindly check and advise if there is any solution or workaround to meet the requirement?

Thank you in advance!

Best Regards,
Nyein

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Nyein,
the only way I found it making to work in some way is to do this mapping:

Then after import run the sql from SQL Firehose or directly on site db that will update the [VariantOptionLanguageId] column value to the correct language id.
Or subscribe to the job finished event and write some code in .Net that will update the language id on this table automatically.
BR, Dmitrij

 

You must be logged in to post in the forum