Skip to Content
1
Former Member
Apr 26, 2018 at 10:21 AM

Approach to remove Duplicate categories of product using Datahub before sending product to hybris

390 Views

Hi All,

I have requirement to append categories to supercategory for product using datahub, for that I am using below code in customsaperpproduct-target-datahub-extension.xml.

   <attribute override="true">
   <name>supercategories</name>
   <collection>true</collection>                          


     <transformationExpression>resolve('CanonicalCustomCategory').categoryList</transformationExpression>
     <exportCode>supercategories(code,catalogVersion(catalog(id),version))[mode=append]</exportCode>
 </attribute>


Consider if I replicate supercetegories :- category1 , category2 first . And if second time I replicate supercetegories :- category1 ,category3 Then in hybris I am getting four categories i.e category1 ,category2,category1 ,category3 I want to remove this duplicate category i.e. "category1 " using datahub What is the best approach for this?

Thank you, Rasika