SAP Knowledge Base Article - Preview

2028504 - How to import data with CSV special characters through hot folder

Symptom

In a few recent issues received by Product Support, the users had issues with importing data using Hot Folder, especially when some special characters were included in the data.

There is not much information about these problems in both forums or wiki pages.

There is an excellent hybris Wiki page, Hot Folder, which shows an example that can be followed step-by-step. This page was created when we were required to import data with special characters, and includes additional information about the csv format required to import new products.

<bean id="trainingProductConverter" class="de.hybris.platform.acceleratorservices.dataimport.batch.converter.impl.DefaultImpexConverter">
        <property name="header">
            <value>$catalogversion=catalogversion(catalog(id[default='electronicsProductCatalog']),version[default='Staged'])[unique=true,default='electronicsProductCatalog:Staged']
                $approved=approvalstatus(code)
                INSERT_UPDATE product;code[unique=true];$catalogversion;name[lang=en];description;ean;$approved
            </value>
        </property>
        <property name="impexRow">
            <value>;{+0};{1};{2};{3};{4};{5}</value>
        </property>
        <property name="type" value="Product"/>
</bean>

Suppose the default settings for following properties under the platform/project.properties file is unchanged:

csv.fieldseparator=;
csv.quotecharacter="

We are able to create the sample import data for products with escape characters as below:

"Product code 44","","'[;:]"""",./\\\\","'[;:]""""dan","123456ab","","","","approved"

The Approved status for the new product has been put on the ninth column in the row, as shown below:

New Product Feed

Column

Attribute

Type

Optional

Localized

Default

Values

Constraints

Description

0 code String
1 variantType String yes ApparelSizeVariantProduct
2 name String yes yes ApparelSizeVariantProduct
3 description String yes yes
4 ean String yes
5 manufacturerName String yes
6 manufacturerAID String yes
7 unit String yes pieces
8 approved String yes check check
approved
9 product tax group String yes eu-vat-full

 eu-vat-full
eu-vat-half

 

 


Read more...

Environment

CPS-WEB version 4.x

Product

hybris Commerce Suite 4.4 ; hybris Commerce Suite 4.5 ; hybris Commerce Suite 4.6 ; hybris Commerce Suite 4.7 ; hybris Commerce Suite 4.8

Keywords

KBA , hybris , hotfolder , CEC-SCC-CLA-ENV-CST , Cloud Storage , How To

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.