16.10 - TextDelimiter and EscapeTextDelimiter - Parallel Transporter

Teradata Parallel Transporter Reference

Product
Parallel Transporter
Release Number
16.10
Published
July 2017
Content Type
Programming Reference
Publication ID
B035-2436-077K
Language
English (United States)

The text delimiter separates column values in delimited data (also known as VARTEXT). Whenever the text delimiter is encountered within the data, it will be interpreted as the end of the current column.

  • The default text delimiter is a single vertical pipe ('|').
  • For comma-separated values (csv) files, the delimiter is a comma (',').
  • Multibyte delimiters are allowed as well, such as double pipe ('| |').

If, for example, the default delimiter the pipe ( | ) is used, the following record (abcd|ef|gh|ijk|lmno) is broken into the following five text formatted columns:

  • abcd
  • ef
  • gh
  • ijk
  • lmno

In the following example, comma delimiters are used, but the second record (third column) uses a comma within the data (“Silver Customer, since 1999”).

First Name Last Name Note
John, Doe, Gold Customer
Sam, Smith, Silver Customer, since 1999

To resolve the ambiguity in the use of the comma in the second record (third column), use one of the following solutions:

  • Use multiple single byte characters as shown in the following table (the TextDelimiter being used is ',,').
    First Name Last Name Note
    John, , Doe, , Gold Customer
    Sam, , Smith, , Silver Customer, since 1999
  • Define an escape text delimiter character using the EscapeTextDelimiter attribute (for example, a backslash ['\']), as in the following example, to embed the comma in the second record (third column).
    First Name Last Name Note
    John, Doe, Gold Customer
    Sam, Smith, Silver Customer\, since 1999