escaping special characters in impex file

When we insert data through impex, its sometime necessary to insert special characters as part of data.

When we provide these values in impex, impex can’t run it successfully.

Its mainly because impex has its own definition for semicolon and colon characters.

Semicolon in impex is field separator and colon is used for composite key.

How do we escape special meaning of these characters and insert those characters as part of data?


We can achieve this by using special delimiter called “path-delimiter”

We can use any character for path-delimiter to escape special characters

Consider below examples


Example 1

  1. $contentCatalog=electronics-ukContentCatalog
  2. $syncJob=sync $contentCatalog:Staged->Online
  3. INSERT_UPDATE SyncAttributeDescriptorConfig;syncJob(code)[default=synjobName][unique=true][path-delimiter=!];attributeDescriptor(enclosingType(code),qualifier)[unique=true];includedInSync;copyByValue[default=false];presetValue;translateValue[default=false];untranslatable[default=false]
  4. ;$syncJob;AbstractPage:originalPage;true
$contentCatalog=electronics-ukContentCatalog
$syncJob=sync $contentCatalog:Staged->Online
INSERT_UPDATE SyncAttributeDescriptorConfig;syncJob(code)[default=synjobName][unique=true][path-delimiter=!];attributeDescriptor(enclosingType(code),qualifier)[unique=true];includedInSync;copyByValue[default=false];presetValue;translateValue[default=false];untranslatable[default=false]
;$syncJob;AbstractPage:originalPage;true


Now when we run this impex, the value for syncJob(code) will be stored as
sync electronics-ukContentCatalog:Staged->Online

This is because, we are using path-delimiter =!

If we don’t use this path-delimiter then we would have got error as below

Example 2

  1. insert_update cmssite;uid[unique=true];defaultCatalog(id)[path-delimiter=!]
  2. ;myStore_site;myStore:catalog
insert_update cmssite;uid[unique=true];defaultCatalog(id)[path-delimiter=!]
;myStore_site;myStore:catalog


Now when we run this impex, hybris searches for catalog id with value as “myStore:catalog” exactly in the table.

If we don’t use path-delimiter then we will get error as below

Note : path-delimiter is Restricted to attributes of type ComposedType

About the Author

Founder of javainsimpleway.com
I love Java and open source technologies and very much passionate about software development.
I like to share my knowledge with others especially on technology 🙂
I have given all the examples as simple as possible to understand for the beginners.
All the code posted on my blog is developed,compiled and tested in my development environment.
If you find any mistakes or bugs, Please drop an email to kb.knowledge.sharing@gmail.com

Connect with me on Facebook for more updates

Share this article on