Developer forum

Forum » Integration » Import products to create new language versions

Import products to create new language versions

Lars Larsen
Lars Larsen
Reply

Hi

I'm want to replicate all products of one language (LANG2) into another language. Therefore I have setup an integration where both source and destination is "Ecom Provider". On the table mapping for EcomProducts I have added a condition on the field ProductLanguageId in order to get all products from the language "LANG2". I have mapped the tables shown in the screenshot. But when running the activity I get this error:

2022-02-21 13:04:04.771: Starting job - Create products for a language.
2022-02-21 13:04:06.363: Starting import to temporary table for EcomGroups.
2022-02-21 13:04:06.470: Added 85 rows to temporary table for EcomGroups.
2022-02-21 13:04:06.470: Finished import to temporary table for EcomGroups.
2022-02-21 13:04:06.470: Starting import to temporary table for EcomVariantGroups.
2022-02-21 13:04:06.470: Added 3 rows to temporary table for EcomVariantGroups.
2022-02-21 13:04:06.480: Finished import to temporary table for EcomVariantGroups.
2022-02-21 13:04:06.480: Starting import to temporary table for EcomVariantsOptions.
2022-02-21 13:04:06.500: Added 18 rows to temporary table for EcomVariantsOptions.
2022-02-21 13:04:06.500: Finished import to temporary table for EcomVariantsOptions.
2022-02-21 13:04:06.500: Starting import to temporary table for EcomProducts.
2022-02-21 13:04:06.518: Job Failed with the following message: Failed to open sqlSourceReader. Reason: Invalid column name 'LanguageID'. The failed input row is:  [VariantOptionId:"VO10"], [VariantOptionGroupId:"VARGRP3"], [VariantOptionName:"2000"], [VariantOptionImgSmall:""], [VariantOptionImgMedium:""], [VariantOptionImgLarge:""], [VariantOptionSortOrder:"6"], [VariantOptionAutoId:"10"], [VariantOptionLanguageID:"ImportedLANG101"]
2022-02-21 13:04:06.705: Finished job - Create products for a language.
2022-02-21 13:04:06.705: Batch failed.

The field "LanguageID" is not a column of the table EcomVariantsOptions. So I can't figure out why I get this error. Is this the correct way of doing what I want to achive and if so what am I missing in order to make it work (get all products with languageId=LANG2 replicated into another language).

Screenshot_2022-02-21_130312.png

Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Lars,
the EcomProvider has a lot of virtual columns functionality, so that it probably why it is failing. I would suggest you to use the Dynamciweb provider instead.
So try to export all your filtered Ecom tables rows you need to the one xml file and simply replace the values of >Lang2< to your needed language id,
then import this file back to DW using Dynamicweb provider.
BR, Dmitrij

 
Morten Snedker Dynamicweb Employee
Morten Snedker
Reply

Hi Lars,

On top of Dmitrij's suggestion: I notice that for column VariantOptionLanguageID says "ImportedLANG101". Have you applied a constant value for the new LanguageId at table EcomVariantsOptions? Whenever you see an "Imported" prefix it is because the job does not recognize the key, and as such it will try and create a new one. But you should make sure the new language exists i EcomLanguages, and that LanguageId you should apply as a constant to the column mapping.

/Snedker

 
Lars Larsen
Lars Larsen
Reply

Hi Morten

I have now added the languageid (LANG7 - which has already been created) to all languageid columns in the tables in the activity. But still I get the same error:

2022-02-22 09:19:53.991: Starting job - Create products for a language.
2022-02-22 09:19:54.902: Starting import to temporary table for EcomGroups.
2022-02-22 09:19:54.946: Added 85 rows to temporary table for EcomGroups.
2022-02-22 09:19:54.946: Finished import to temporary table for EcomGroups.
2022-02-22 09:19:54.946: Starting import to temporary table for EcomVariantGroups.
2022-02-22 09:19:54.961: Added 3 rows to temporary table for EcomVariantGroups.
2022-02-22 09:19:54.961: Finished import to temporary table for EcomVariantGroups.
2022-02-22 09:19:54.961: Starting import to temporary table for EcomVariantsOptions.
2022-02-22 09:19:54.981: Added 18 rows to temporary table for EcomVariantsOptions.
2022-02-22 09:19:54.982: Finished import to temporary table for EcomVariantsOptions.
2022-02-22 09:19:54.982: Starting import to temporary table for EcomProducts.
2022-02-22 09:19:54.982: Job Failed with the following message: Failed to open sqlSourceReader. Reason: Invalid column name 'LanguageID'. The failed input row is:  [VariantOptionId:"VO10"], [VariantOptionGroupId:"VARGRP3"], [VariantOptionName:"2000"], [VariantOptionImgSmall:""], [VariantOptionImgMedium:""], [VariantOptionImgLarge:""], [VariantOptionSortOrder:"6"], [VariantOptionAutoId:"10"], [VariantOptionLanguageID:"ImportedLANG18"]
2022-02-22 09:19:55.178: Finished job - Create products for a language.
2022-02-22 09:19:55.178: Batch failed.

Could it be that I miss some tables?

 
Morten Snedker Dynamicweb Employee
Morten Snedker
Reply

Hi Lars,

Do you have a link and name of the job - then I will review it.

BR
Snedker

 
Lars Larsen
Lars Larsen
Reply

Hi Morten

Thank you. I will email you the link to the solution.

 
Morten Snedker Dynamicweb Employee
Morten Snedker
Reply

Hi Lars,

After reviewing the solution I see that it is on a 9.6 version. I am quite confident that the issue you encounter is resolved on most recent 9.12/9.13, and that an upgrade will solve the problem. Alternatively, you can try and update just the inflicted providers from nuget.

In either case you may most lightly need to create the job from scratch as the existing already contains wrong mapping properties.

Hope the above is helpful.

/Snedker

 

You must be logged in to post in the forum