LAYOUT - Parallel Data Pump

Teradata Parallel Data Pump Reference

Product
Parallel Data Pump
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-3021
lifecycle
previous
Product Category
Teradata Tools and Utilities

LAYOUT

Purpose  

The LAYOUT command, in conjunction with the immediately following sequence of FIELD, FILLER, and TABLE commands, specifies the layout of the externally stored data records.

Syntax  

where

 

Syntax Element

Description

layoutname

Name assigned to the layout for reference by one or more subsequent IMPORT commands

A layoutname must obey the same rules for its construction as Teradata SQL column names.

The name specified also may be used in the LAYOUT clause of an IMPORT command.

MACROCHARSET

An optional clause on the layout command. If no fieldlevel MACROCHARSET is present for a field of character type, but a layoutlevel MACROCHARSET is present, TPump generates a CHARACTER SET clause in the macro creation DDL for the corresponding field using the specified layout character set.

servercharsetname

Server storage character set name. The following two documents are for the valid server storage character set names: International Character Set Support (B0351125) and SQL Data Definition Language (B0351144).

CONTINUEIF condition

following:

position = value

where position is an unsigned integer (never an asterisk) that specifies the starting character position of the field of every input record that contains the continuation indicator, and where value is the continuation indicator specified as a character constant or a string constant. Teradata TPump uses the length of the constant as the length of the continuation indicator field.

In the CONTINUEIF option, the condition specified as position = value is case‑sensitive; verify that the correct case has been specified for this parameter.

If the condition is true, Teradata TPump forms a single record to be sent to Teradata Database, by concatenating the next input record at the end of the current record. (The current record is the one most recently obtained from the external data source.)

If the condition parameter is false, Teradata TPump sends to Teradata Database, the current input record either by itself, or as the last of a sequence of concatenated records.

Note that the starting position of the continuation indicator field is specified as a character position of the input record. Character positions start with character position one. Teradata TPump removes the continuation indicator field from the input records so that they are not part of the final concatenated result.

For other fields whose startpos is specified as an unsigned integer, the startpos refers to the field position within the final concatenated result. Consequently, the continuation indicator field cannot be defined as all or part of a field defined with the FIELD, FILLER, or TABLE commands. Refer to the startpos parameter of the FIELD command.

 

When the character set of the job script is different from the client character set used for the job (for example, on z/OS the job script must be in Teradata EBCDIC when using the UTF8 client character set, or UTF‑16 client character set can be used with the job script in UTF8), Teradata TPump translates the specified value, which is either a character constant or a string constant, from the script character set form to the client character set form before evaluating the condition. Teradata TPump uses the length of the constant in the client character set form as the length of the continuation indicator field.

Notice:

When using the UTF‑8 client set on the mainframe, be sure to examine the definition in International Character Set Support (B035‑1125) to determine the code points of the special characters required. Different versions of EBCDIC do not always agree as to the placement of these characters.

The mappings between Teradata EBCDIC and Unicode can be referred to International Character Set Support (B035‑1125).

INDICATORS

Condition that the data is in the indicator mode

This means that the first n bytes of each record are indicator bytes, where n is the rounded‑up integer quotient of the number of fields defined by this LAYOUT command for transmission to Teradata Database, divided by 8.

Teradata TPump sends all the FIELD commands, including redefines, to Teradata Database. If a field has been defined and then redefined, indicator bits must be set for both. FILLER commands also need to have indicator bits set. Teradata TPump sends both the defined and the redefined fields to Teradata Database. This demonstrates the inefficiency of redefines which cause the transfer of an extraneous field.

If INDICATORS is specified on the LAYOUT command and the data file does not contain indicator bytes in each record, the target table will be loaded with spurious data. Conversely, if INDICATORS is not specified and the data file contains indicator bytes in each record, the target table will likewise be corrupted. Exercise caution to guard against either occurrence.

A LAYOUT command that includes the INDICATORS option must accurately describe all fields of the record to agree with the column descriptions and ordering of the table from which this indicator‑mode data was previously selected. If the INDICATORS option is specified, Teradata TPump sends the data to Teradata Database with indicators.

The NULLIF parameter of the FIELD command can be specified with or without the INDICATORS option. If NULLIF is specified, Teradata TPump sends the data to Teradata Database with indicators, whether or not the INDICATORS option is specified.

Usage Notes

Although there is no explicit limit to the number of LAYOUT commands allowed, there is a practical limit. The implied limit on usable LAYOUT commands per Teradata TPump load is 100, because Teradata TPump allows up to 100 IMPORT commands within a load, and each IMPORT can reference only one LAYOUT.

A LAYOUT command must be immediately followed by a combination of FIELD, FILLER, and/or TABLE commands. This sequence of commands, referenced by the layoutname, may describe one or more record formats contained in one or more client data sources (see redefinition options for FIELD, FILLER, and TABLE). The LAYOUT command sequence is terminated by the first subsequent command that is not a FIELD, FILLER, or TABLE command.

A layoutname may be used by one or more Teradata TPump tasks (delimited by BEGIN LOAD and END LOAD) in a single job step and must be defined prior to any IMPORT commands that reference it. All IMPORT commands in a single Teradata TPump task must reference the same layoutname in the LAYOUT clause.

If a field‑level MACROCHARSSET is present for a field of character type, TPump generates a CHARACTER SET clause in the macro creation DDL for the corresponding field using the specified character set.

If no field‑level MACROCHARSET is present for a field of character type, but a layout/schema‑level MACROCHARSET is present, TPump generates a CHARACTER SET clause in the macro creation DDL for the corresponding field using the specified layout character set.

Absent user specification, the following clause will be generated for each character macro parameter CHARACTER SET LATIN, when the client session character set is:

  • Is ASCII
  • Is EBCDIC
  • Ends in _0A or _0E
  • Ends in _zx, where “z” is other than 0 (digit zero)
  • Ends in _zx, where “z” is other than 0 (digit zero)
  • Does not end in _zx or _zxx, except for KATAKANAEBCDIC, UTF‑8, or UTF‑16
  • TPump generates CHARACTER SET UNICODE in all other cases.