0

If I have some CSV files and I want to give them priority as per my requirement in Hotfolder, What to do ?

Lcoder_001
  • 153
  • 4
  • 14

1 Answers1

2

This is the role of FileOrderComparator that compares files based on their file names. On this behalf a priorities are configurable for file name prefixes.

Files with a higher priority value are considered more important and go first.

This ensures some files are imported before others for example products should be imported before prices.

<!-- example taking from the accelerator -->
<bean id="fileOrderComparator" class="de.hybris.platform.acceleratorservices.dataimport.batch.FileOrderComparator">
    <property name="prefixPriority">
        <map>
            <!-- default priority is 0 -->
            <entry key="base_product" value="2" />
            <entry key="variant" value="1" />
        </map>
    </property>
</bean>
Mouad EL Fakir
  • 3,609
  • 2
  • 23
  • 37