Skip to Content
0
Former Member
Feb 11, 2015 at 04:07 PM

Data Hub generates invalid .impex file?

326 Views

Hi all,

I got the following error when publishing data from Data Hub to the hybris core:

 <status>COMPLETE_W_ERRORS</status>
             <targetSystemName>HybrisNTCoreInstallation</targetSystemName>
             <errorList>
                 <code>UNCLASSIFIED</code>
                 <message>line 6: cannot create Product with values ItemAttributeMap[ registry:  null, type: &lt;null&gt;, data: {code=ITM00002} ] due to [de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator@62852c16]:missing values for [catalogVersion] in model ProductModel (&lt;unsaved&gt;) to create a new Product</message>
             </errorList>

It looks like there is some problem with $catalogVersion variable, but I am using it in the same way like it is used in Data Hub trail:

  <exportCode>         $catalogVersion=catalogversion(catalog(id[default=apparelProductCatalog]),version[default='Staged'])[unique=true,default=apparelProductCatalog:Staged]
                     </exportCode>
 (...)
     <item>
                         <type>TargetProduct</type>
                         <exportCode>Product</exportCode>
                         <description />
                         <updatable>true</updatable>
                         <canonicalItemSource>CanonicalProduct</canonicalItemSource>
                         <status>ACTIVE</status>
                         <attributes>
                             (...)
                             <attribute>
                                 <name>catalogVersion</name>
                                 <localizable>false</localizable>
                                 <collection>false</collection>
                                 <transformationExpression />
                                 <exportCode>$catalogVersion</exportCode>
                                 <mandatoryInHeader>true</mandatoryInHeader>
                             </attribute>
     (...)

When I looked at the .impex, which is generated by Data Hub, I noticed that ignore tag is added to the empty columns (that's ok), but also to the catalogVersion (that's not ok):

 (...)
 INSERT_UPDATE Product;;code[unique=true];$catalogVersion;name[lang=en];size;seasonCode
 ;1;ITM00002;<ignore>;My test product;8;<ignore>

If I manually remove the ignore tag from the catalogVersion column (but leave it in the seasonCode column), the impex is imported without errors:

 (...)
     INSERT_UPDATE Product;;code[unique=true];$catalogVersion;name[lang=en];size;seasonCode
     ;1;ITM00002;;My test product;8;<ignore>

So, my question is how to configure catalogVersion is such a way that Data Hub would be able to generate valid impex files?