TPT: Executing & debugging
Commands & associated attributes to execute Teradata Parallel Transporter (TPT) job along with variables or without variables.
- tbuild: This command is used to execute TPT job script. There are different options avaiable to execute job. Order of options is not important.
In order to use the defined variables in TPT job, exact same variable name should be defined in the TPT job script with '@' followed by variable name.
- Syntax1: Simple TPT script without variables.
tbuild -f [TPT_script_filename]
- Syntax2: TPT script with variables defined in command.
tbuild -f [TPT_script_filename] -u "file_path = '$HOME',file_name='datafile_name.csv'"
Note: 1. Multiple variables can be defined and a comma(,) is required to separate two or more variables.
- Syntax3: TPT script with variables defined in file.
tbuild -f [TPT_script_filename] -v $HOME/tutorials_logon.ksh
************File Content tutorials_logon.ksh*************
User_Name='tutorials_user'
Password='tutorials_user_password'
TD_PID='dbc'
************************************************
Note: 1. Multiple variables can be defined in a file and it is required to define 1 variable & its value per line.
- Syntax4: TPT script with character encoding(unicode).
tbuild -f [TPT_script_filename] -e "[characterSet]"
Note: Default character set is 7-bit ASCII,supported character Sets 'UTF-16','UTF-8','UTF-16LE' & 'UTF-16BE'
- tlogview: This command can be used to retrieve logs generated by running TPT job.
- twbcmd: This command can be used to control (pause,resume,terminate,job status & create checkpoints) running TPT job. jobid is the jobname followed by a "-", then followed by the Teradata PT-generated sequence number.
- Syntax1: Holding a TPT job.
twbcmd [jobid] JOB PAUSE
- Syntax2: Resuming a TPT job
twbcmd [jobid] JOB RESUME
- Syntax3: Terminating a TPT job.
twbcmd [jobid] JOB TERMINATE
- Syntax4: Display row processing statistics.
twbcmd [jobid] JOB STATUS
- Syntax5: Creating a Checkpoint.
twbcmd [jobid] JOB CHECKPOINT
- twbrmcp: This command can be used to remove all the checkpoints created by running TPT jobs using a file system username or jobid .
- Syntax1: Removing checkpoints using jobid.
twbrmcp [jobid]
- Syntax2: Removing checkpoints using filesystem username.
twbrmcp [username]
- twbstat: This command can be used to see all the active TPT job.
- Syntax1: Retrieve logs.
twbstat
- twbkill: This command can be used to terminate all the task active as part of TPT job.
- Syntax1: Retrieve logs.
twbkill [jobid]