sap-commerce-cloudhotfolder

how to give priority to csv files in hotfolder?


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


Solution

  • 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>