Reputation: 41
I have a csv file which needs to be uploaded in hybris. The CSV file has data which is to be loaded in different table in Hybris.
Currently , The hybris takes the CSV file , there is one mapping (i.e. impex header) for one file.
Can we have multiple impex for a single CSV file in hotfolder configuration so that the data will be loaded into different table
Thanks, Sanjay Vithani.
Upvotes: 1
Views: 8602
Reputation: 21
Using Impex / HotFolder you can Import multiple types / tables from one file all you need to do is maintain different Headers for different type /table example below :
<bean id="batchProductConverter" class="de.hybris.platform.acceleratorservices.dataimport.batch.converter.impl.DefaultImpexConverter">
<property name="header">
<value>#{defaultImpexProductHeader}
# Insert Products
INSERT_UPDATE Product;code[unique=true];varianttype(code);name[lang=$lang];description[lang=$lang];ean;manufacturerName;manufacturerAID;unit(code)[default=pieces];$approved;Europe1PriceFactory_PTG(code)[default=eu-vat-full];sequenceId[translator=de.hybris.platform.acceleratorservices.dataimport.batch.converter.SequenceIdTranslator];$catalogVersion
</value>
</property>
<property name="impexRow">
<value>;{+0};{1};{2};{3};{4};{5};{6};{7};{8};{9};{S}</value>
</property>
<property name="rowFilter">
<bean class="de.hybris.platform.acceleratorservices.dataimport.batch.converter.impl.DefaultImpexRowFilter">
<property name="expression" value="!row[1]"/>
</bean>
</property>
<property name="type" value="Product"/>
</bean>
by using same technique you can also populate one type / table with different files..
Upvotes: 1
Reputation: 3059
A simple way to convert 1 hot folder csv into multiple output impex files is to add multiple ConverterMapping
beans with the same prefix.
The ImpexTransformerTask
bean will receive the input files and pass them to ConverterMapping
beans which have a matching prefix. Each ConverterMapping
has a corresponding ImpexConverter
.
Upvotes: 3
Reputation: 2989
If you have multiple headers, you can load data into different tables. You could have as many headers as you need in one csv file.
Upvotes: 0