Changing and Defining Delimiters
There are three types of delimiter: record delimiter,
default field delimiter
and field delimiter.
Delimiters can be seen and edited in Metadata Editor.
They are displayed in the fourth column
(Delimiter column) of the
Record pane.
If the delimiter in this Delimiter column
of the Record pane is grayish, this means that
the default delimiter is used.
If you look at the Delimiter row in the Details
pane on the right side from the Record pane,
you will see that this row is empty.
![[Note]](../figures/note.png) | Note |
---|
Remember that the first row of the Record
pane displays the information about the record as a whole instead of
about its fields.
Field numbers, field names, their types, delimiters and/or sizes are displayed starting from the second row.
For this reason, if you click the first row of the
Record pane, information about the whole record
instead of any individual field will be displayed in the
Details pane.
|
![[Important]](../figures/important.png) | Important |
---|
Multiple Delimiters If you have records with multiple delimiters (for example: John;Smith\30000,London|Baker Street ),
you can specify default delimiter as follows: Type all these delimiters as a sequence separated by \\| . The sequence does not contain white spaces. For the example above there would be ,\\|;\\||\\|\\ as the default delimiter.
Note that double backslashes stand for single backslash as delimiter. The same can be used for any other delimiter, also for record delimiter and/or non-default delimiter. For example, record delimiter can be the following: \n\\|\r\n
Remember also that you can have delimiter as a part of field value of flat files
if you set the Quoted string attribute of FlatFileReader to true
and surround the field containing such delimiter by quotes.
For example, if you have records with comma as field delimiter, you can process the following as one field: "John,Smith"
CTL Expression Delimiters If you need to use any non-printable delimiter, you can write it down as a CTL expression.
For example, you can type the following sequence as the delimiter
in your metadata:
\u0014
Such expressions consist of the Unicode \uxxxx code with no
quotation marks around.
Please note that each backslash character '\' contained in the input data will actually be doubled
when viewed. Thus, you will see
"\\" in your metadata.
|
![[Important]](../figures/important.png) | Important |
---|
Java-Style Unicode Expressions
Remember that (since version 3.0) you can also use
the Java-style Unicode expressions (except in URL attributes).
You may use one or more Java-style Unicode expressions (for example, like this one): \u0014 . Such expressions consist of series of the \uxxxx codes of characters. They may also serve as delimiter (like CTL expression shown above, without any quotes): \u0014
|