Developer forum

Forum » Dynamicweb 10 » Integration - Mapping with Code expressions to Virtual Column

Integration - Mapping with Code expressions to Virtual Column

Eric Petroelje
Reply

So we are running into an issue with importing item categories into Dynamic Web as EcomGroups using the EcomProvider. The specific issue I'm running into is that when I try to use a code expression for mapping a value from my source data into to the ParentGroups virtual column, it appears to ignore my code expression.

If I map directly to a column in the source data, it works fine, but code expressions don't seem to work there. Unfortunately I need to use a code expression since the actual parent category isn't in the source data, it's derived from the group code itself.  Anyone else run into this issue before or have a solution for it?

(I'm also running into the same issue trying to use a code expression with a virtual column in the EcomProducts import - mapping to the VariantGroups virtual column)


Replies

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

Hi Eric,
unfortunatelly that is a bug. I have created item #28914 to fix that. There is a workaround for it but it would require two jobs and a staging table.
1. Run a first import job from the original source into a plain SQL staging table, mapping the derived value onto a regular, non-virtual destination column using whatever script type you need (Code, Substring, etc.) — regular columns are resolved through the correct code path (EcomDestinationWriter.cs's main per-column write loop), so scripts work fine there.
2. Run a second job that imports from that staging table into EcomGroups/EcomProducts, with a plain, direct column mapping from the pre-computed column to ParentGroups/VariantGroups — no script involved, so it bypasses the bug.

Append/Prepend script types do work directly on these two virtual columns, but they can only glue a static string onto the source value — no substring/parsing logic — so they likely won't cover deriving a parent from a structured code, just simpler cases.

BR, Dmitrij

Votes for this answer: 1

 

You must be logged in to post in the forum