The tdload command has two modes of operation which are inferred from the input given to it by the user. These modes are: Fully-Automatic and Semi-Automatic.
In Fully-Automatic mode, tdload automatically decides, based on the data source and target, the optimal operators that are to be used for the load job. To operate in Fully-Automatic mode, the user specifies only generic job variables. This is discussed in detail in the section “Fully-Automatic Operation”.
In Semi-Automatic mode, the user chooses the producer and/or consumer operator by using an operator template job variable, and allows Easy Loader to default required job variables, as well as translate generic job variables provided into operator specific job variables. This is discussed in detail in the section “Semi-Automatic Operation”.
Fully-Automatic Operation
- A data source and a data destination
- Generic tdload job variables, prefixed by ‘Source’ and ‘Target’.
Generic tdload job variables are any TPT operator template job variables with the operator specific prefix removed and replaced with either Source (for producer type operators) or Target (for consumer type operators).
For example, The generic form of the operator 'DCPTextDelimiter' is 'SourceTextDelimiter'.
In Fully-Automatic operation, tdload will access the target table specified and determine optimal load protocol. After this, it will generate the optimal Teradata PT script and a standard job variable file. The tbuild command will then run with these files.
Semi-Automatic Operation
- A data source and a data destination.
- Generic tdload job variables, prefixed by 'Source' and 'Target'.
- One or more non-generic operator job variables
In Semi-automatic mode, the user may choose the specific producer or consumer operator (or both). To do this, the user must define at least one job variable with the desired operator name as the prefix.
For example, if the user wants to use the Load operator as the consumer operator, then specify “LoadTraceLevel” instead of “TargetTraceLevel”.
All generic Source and Target job variables provided will be resolved automatically to match operators chosen by the user, if the generic job variables provided are applicable to the operators chosen.
A command example that would result in the Export operator as the producer and the Load operator as the consumer being used:
tdload -j my_jv_file.txt --ExportTraceLevel All --LoadTraceLevel All
In this example, assuming that the Job Variable file provided to the '-j' flag contains valid generic job variables, Export and Load operators would be used.
A command example that would result in tdload choosing the producer and the user choosing the Update operator as the consumer being used:
tdload -f my_delim_data.txt –h myTdpId –u MyUserName –p MyPassword –t MyTargetTable --UpdateTraceLevel All
- Operators chosen by the user must be valid for the Source and Target. This example would only work if the Source was a flat file and the Target was a database table.
- tdload only supports a single producer and single consumer. Defining multiple producer and/or consumer operators will result in an error.
Operational Considerations
- When loading a file into a table in fully automatic operation, tdload determines the optimal load protocol to be used for the load job based on the characteristics of the target table.
- tdload logon job variables have no operator specific prefixes.Valid logon job variables are:
- TargetTdpId
- TargetUserName
- TargetUserPassword
- TargetAccountId
- TargetWorkingDatabase
- TargetLogonMech
- TargetLogonMechData
- SourceTdpId
- SourceUserName
- SourceUserPassword
- SourceAccountId
- SourceWorkingDatabase
- SourceLogonMech
- SourceLogonMechData
Easy Loader Defaults
For both Fully and Semi-Automatic modes, tdload attempts to default job variables critical for operation. If the user wishes to have complete control over these values, they need to overwrite all defaulted job variables either on command line or in a job variable file.
- SourceInstances = 1
- TargetInstances = 1
- SourceMinSessions = 1
- TargetMinSessions = 1
- SourceMaxSessions = 32
- SourceFormat = 'Delimited'
- SourceOpenMode = 'Read'
- SourceTextDelimiter = ‘,’
- SourceTraceLevel = 'None'
- TargetMaxSessions = 32
- TargetFormat = 'Delimited'
- TargetOpenMode = 'Write'
- TargetTextDelimiter = ','
- TargetTraceLevel = 'None'