25.09.2015 Views

Teradata Parallel Data Pump

Teradata Parallel Data Pump Reference - Teradata Developer ...

Teradata Parallel Data Pump Reference - Teradata Developer ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 3: <strong>Teradata</strong> T<strong>Pump</strong> Commands<br />

FIELD<br />

Usage Notes<br />

One or more FIELD commands may be intermixed with the TABLE command and the<br />

FILLER command. These commands must follow a LAYOUT command.<br />

If an input record field in fieldname is redefined, the data type from “character” to “decimal”<br />

with the datadesc parameter cannot be changed. This is illegal in <strong>Teradata</strong> T<strong>Pump</strong> and will<br />

abort the job and return an error message.<br />

If both NULLIF and DROP LEADING/TRAILING BLANKS/NULLSis specified on the same<br />

FIELD command, the DROP clause is evaluated after the NULLIF clause. As an example, in<br />

the FIELD command:<br />

.FIELD FIELDNAME * CHAR (5) NULLIF FIELDNAME = 'x'<br />

DROP LEADING BLANKS;<br />

if the input for fieldname is 'x', the NULLIF expression would evaluate to false because the<br />

leading blanks are not dropped before the NULLIF evaluation.<br />

Specifying <strong>Data</strong> Types<br />

Use the datadesc parameter to specify the type and length of data in the field. <strong>Teradata</strong> T<strong>Pump</strong><br />

generates the USING phrase accordingly with the user-assigned field name to which the body<br />

of the DML statement refers.<br />

For complete details on data types and data conversions, see SQL <strong>Data</strong> Types and Literals.<br />

The following is a short list of the input length and field description for the data type<br />

specifications which can be made in the datadesc parameter:<br />

Graphic <strong>Data</strong> Type Specifications<br />

GRAPHIC(n)<br />

Where n is the length of the input stream in terms of double-byte characters.<br />

Length: n*2 bytes, if n is specified; otherwise 2 bytes, as n=1 is assumed.<br />

Description: n double-byte characters.<br />

The following example illustrates the use of the GRAPHIC data types in support of kanji or<br />

multibyte character data. The FIELD statement can contain GRAPHIC data types.<br />

.LAYOUT KANJIDATA;<br />

.FIELD EMPNO * SMALLINT;<br />

.FIELD LASTNAME * GRAPHIC(30);<br />

.FILLER FIRSTNAME * GRAPHIC(30);<br />

.FIELD JOBTITLE * VARGRAPHIC(30);<br />

VARGRAPHIC(n)<br />

Where n is the length of the input stream in terms of double-byte characters.<br />

Length: m + 2 bytes where m/2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!