16.10 - Syntax - 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)

tdload has the following syntax:



where jobOptions are:

Syntax Element Description
-c characterSet The character set encoding of the flat file. This option sets the client session character set.

Specify this option if the flat file is not an ASCII file.

-d "delimiterCharacter" The delimiter character used to separate the fields of the data records in the delimited format flat file.
The default delimiter character is a comma ('',''). This is different from the usage in Teradata PT scripts where the default delimiter character is the pipe character (''|''). You must specify this option if the delimiter character in your flat file is not a comma.
-f fileName Required. The name of the flat file containing the data to be loaded.

If you are not executing the tdload command in the directory where the flat file is stored, fileName must be a fully qualified flat file name.

  • The -f (or --SourceFileName) option and the --SourceTable option are mutually exclusive.

    An error is returned if both of these options are specified on the tdload command line.

  • The -f (or --SourceFileName) option and the --SelectStmt option are mutually exclusive.

    An error is returned if both of these options are specified on the tdload command line.

-h tdpId The name by which the Teradata Data Warehouse Appliance 2xxx is known to the network.

If the option is not specified, the default host name will be used.

Recommendation: Specify this option to make sure you are connecting to the correct system.

-j jobVariablesFile The name of the job variables file.

If you are not executing the tdload command in the directory where the job variables file is stored, jobVariablesFile must be a fully qualified filename.

-L jobLogDirectory Option that designates the location of the Teradata PT files created during job execution.

jobLogDirectory is the full path name of the directory in which the Teradata PT files are stored.

This option is not supported on z/OS.

-p password The password of the specified Teradata user.

If the option is not specified, tdload prompts you for a password.

- R restartLimit Option that overrides the default value of five tries at automatic (job) restart.

If you specify -R, enter a value or the system will reject the command and return an error.

The restartLimit value can be any whole number greater than zero or equal to zero. The value zero prevents automatic job restart.

- r checkpointDirectory Option that specifies that checkpoint files are to be stored in a directory called “CheckpointDirectory.”

If the -r option is not specified, then checkpoint files will be stored in the default checkpoint directory that is defined in the Teradata PT configuration file.

-S Saves the Teradata PT script generated by the command.
-t tableName Required. The name of the target table.
If the target table resides in a database that is different from the default database of the specified Teradata user, you must also use the --TargetWorkingDatabase option.
-u userName Required. The logon id of the Teradata user with access privileges to the target table.
-v Option that displays the version number of tdload without running a job.

Do not use with any other option. The option works only on UNIX and Windows platforms.

-x Enables debugging.
- z checkpointInterval Option that specifies a time interval in seconds between checkpoints.

If this option is not specified, there will be no interval checkpointing.

--help Displays help.
<long_option> value Easy Loader supports all standard job variables which are defined within the operator templates as well as generic job variables. These generic job variables are derived from operator templates and allow Easy Loader to automatically make operator decisions. To construct a generic job variable, simply remove the operator name from the template job variable, and add ‘Source’ or ‘Target’ depending on if the operator is a producer or consumer, respectively.

For example, the trace level job variable for the Load operator is “LoadTraceLevel”, to make this generic, specify it as “TargetTraceLevel”. If Load is the consumer operator chosen by Easy Loader, “TargetTraceLevel” will be automatically mapped to the load operator.

See the Teradata PT Easy Loader section in the Teradata Parallel Transporter User Guide (B035-2445) for more examples and instructions.

Where commonly used long options are:

Long Option Description
--SelectStmt “SELECT statement(s);” SELECT statement performs data selection from Teradata Database tables.

Since the SELECT statement can have space/blank characters, the entire statement should be enclosed in double quotation marks (") when specified on the command line, as follows:

tload --SelectStmt "sel * from src_tbl;"

SELECT statement requests cannot:

  • Specify a USING modifier.
  • Access non-data tables, such as SELECT DATE or SELECT USER.
  • Be satisfied by one or two AMPs, such as a SELECT statement that accesses rows based on the primary index or unique secondary index of a table.
  • Contain BLOB (Binary Large Object) or CLOB (Character Large Object) data types.
  • Contain JSON (JavaScript Object Notation) data type.
  • Contain XML data type.

The --SelectStmt option and the -f (or --SourceFileName) option are mutually exclusive. An error is returned if both of these are define on the tdload command line.

If both the --SelectStmt option and the -- SourceTable option are defined, the --SourceTable option is ignored and a warning message is returned to the console.

--SourceAccountId accountId The account associated with the specified Teradata user.
--SourceFileName fileName Required. The name of the flat file that contains the data to be loaded.
  • The --SourceFileName (or -f) option and the --SourceTable option are mutually exclusive.

    An error is returned if both of these options are specified on the tdload command line.

  • The --SourceFileName (or -f) option and the --SelectStmt option are mutually exclusive.

    An error is returned if both of these options are specified on the tdload command line.

--SourceInstances number The number of instances used to extract data from Teradata.

The default value is 1.

--SourceMaxSessions number The maximum sessions to be used in extracting data from tables.

The default value is 32.

--SourceMinSessions number The minimum sessions to be used in extracting data from tables.

The default value is 1.

--SourceTable tableName The name of the source table.

Note: If the source table resides in a database that is different from the default database of the specified Teradata user, you must also use the --SourceWorkingDatabase option.

The option --SourceTable and the -f (or --SourceFileName) option are mutually exclusive. An error is returned if both of them are specified on the tdload command line.

If both the --SourceTable option and the --SelectStmt option are defined, the option --SourceTable is ignored and a warning message is returned to the console.

--SourceTextDelimiter "delimiterCharacter" The delimited character used to separate the fields of the data records in the delimited format flat file.
--SourceTdpId tdpId The name by which the Teradata Database is known to the network.
--SourceTraceLevel value Enables trace messages in the operator that reads data from flat file(s).

Valid values are:

  • 'Yes' = tdload sets the value 'all' to the attribute 'TraceLevel' of the appropriate operator.
  • 'No' = TraceLevel is turned off (default).
--SourceUserName userName The logon id of the Teradata user with access privileges to the source table.
--SourceUserPassword password The password of the specified Teradata user.

If the option is not specified, tdload will prompt you for a password.

--SourceWorkingDatabase databaseName The database where the source table is located.
--TargetAccountId accountId The account associated with the specified Teradata user.
--TargetErrorLimit number The maximum errors allowed in data records.

When the number of errors encountered exceeds this number, the load job terminates.

The default value is 1.

--TargetMaxSessions number The maximum sessions to be used in the load job.

The default value is 32.

--TargetMinSessions number The minimum sessions to be used in the load job.

The default value is 1.

--TargetTable tableName Required. The name of the target table.
--TargetTdpId tdpId The name by which the Teradata Database is known to the network.
--TargetTraceLevel value Enables trace messages in the operator that loads data to the target table.

Valid values are:

  • 'Yes' = tdload sets the value 'all' to the attribute TraceLevel of the appropriate operator.
  • 'No' = TraceLevel is turned off (default).
--TargetUserName userName Required. The logon id of the Teradata user with access privileges to the target table.
--TargetUserPassword password The password of the specified Teradata user.
--TargetWorkingDatabase databaseName The database containing the target table.
This option is required if the target table resides in a database that is different from the default database of the specified Teradata user.
“--< long_option> value” is any of the generic or operator template job variables. For more information on usage, see the Teradata PT Easy Loader section of the Teradata Parallel Transporter User Guide (B035-2445).

where:

Option Specifies
jobName A unique name that identifies the load job.

Recommendation: Teradata strongly recommends that you specify names for your jobs when multiple load jobs are running simultaneously.