How to get values from TPT log file?

Tools & Utilities

How to get values from TPT log file?

Hello,

This is my TPT log file

Teradata Parallel Transporter Version 14.00.00.03

Job log: /opt/teradata/client/14.00/tbuild/logs/mytest-175.out

Job id is mytest-175, running on xxxxxx

Found CheckPoint file: /opt/teradata/client/14.00/tbuild/checkpoint/ mytestLVCP

This is a restart job; it restarts at step MAIN_STEP.

Teradata Parallel Transporter SQL Selector Operator Version 14.00.00.03

SQL_SELECTOR: private log specified: selector_log

Teradata Parallel Transporter DataConnector Version 14.00.00.03

FILE_WRITER Instance 1 directing private log report to 'dataconnector_log-1'.

FILE_WRITER Instance 1 restarting.

FILE_WRITER: TPT19007 DataConnector Consumer operator Instances: 1

FILE_WRITER: TPT19003 ECI operator ID: FILE_WRITER-23162

SQL_SELECTOR: connecting sessions

SQL_SELECTOR: restarting the job

FILE_WRITER: TPT19222 Operator instance 1 processing file '/xxxx/xxxx/xxxxx/files/history/dataset1_201209.csv'.

SQL_SELECTOR: sending SELECT request

SQL_SELECTOR: retrieving data

SQL_SELECTOR: Total Rows Exported:  20

SQL_SELECTOR: finished retrieving data

SQL_SELECTOR: disconnecting sessions

FILE_WRITER: TPT19221 Total files processed: 1.

SQL_SELECTOR: Total processor time used = '0.11 Second(s)'

SQL_SELECTOR: Start : Thu Nov 21 01:05:20 2013

SQL_SELECTOR: End   : Thu Nov 21 01:05:26 2013

Job step MAIN_STEP completed successfully

Job mytest completed successfully

from the above log file I want to make use of certain values.

for example

from this

SQL_SELECTOR: Total Rows Exported:  20

i want to make use of 20 to insert in a db table. Similarly i need to take total processor time used,total files processed etc.,

how to do this ? do i need to parse entire text file or is there any alternative way of doing it? 

thnks.

1 REPLY
Teradata Employee

Re: How to get values from TPT log file?

In the log there are several "private" logs (virtual logs). One of them is called TWB_STATUS.

If you look in the TPT documentation (at 14.00 I do not remember if the information is in the Reference Manual or the User Guide), we will show you the layout/schema of the TWB_STATUS log.

You can use the tlogview command (with -f TWB_STATUS) to extract out the contents of that private log. I believe it is formatted as a set of comma-delimited records.

You can then load that data into a Teradata table (even by using TPT). We do have a few customers that do this already.

-- SteveF