How You Manage Reserved Characters
A few characters are reserved in the context of an HCM Data Loader data file. That is, they have a specific meaning by default, and you can't include them in attribute values unless you identify them explicitly as data.
This topic explains how to use the reserved characters in data that you're uploading. It also explains how to override the default reserved characters.
Using Reserved Characters in Attribute Values
By default, these characters are reserved:
-
Delimiter (vertical bar |)
-
Newline character (n)
-
Escape (backslash \)
To include the newline (n) and vertical bar (|) characters in attribute values, you precede them immediately with the escape character (backslash \). For example:
METADATA|Address|AddressLine1
MERGE|Address|The Stables\|Main Allan
This entry enables the vertical bar to appear in the attribute value for address line 1:
The Stables|Main Allan
To include the newline character in a value, you specify \n. For example:
METADATA|Address|AddressLine1
MERGE|Address|The Stables\nMain Allan
This entry results in the following value for address line 1:
The Stables
Main Allan
Overriding the Reserved Characters
You can override the reserved characters for a file using the SET file-line instruction, which must appear before any METADATA lines in the file. The SET commands for overriding reserved characters have this format:
SET FILE_ESCAPE <new_value>
SET FILE_DELIMITER <new_value>
SET FILE_NEW_LINE <new_value>
The new value can be up to 10 characters. For example, you could set the newline character to newline and the file delimiter to comma (,) using the following SET commands:
SET FILE_DELIMITER ,
SET FILE_NEW_LINE newline
In this case, METADATA and MERGE lines could appear as follows:
METADATA,Address,AddressLine1
MERGE,Address,TheSteading\newlineKier Allan
You can also override the reserved characters for the enterprise by setting relevant configuration parameters. For example, set the File Delimiter configuration parameter to override the default file delimiter for the enterprise.