TPT 14 WorkingDatabase and TargetTable getting crossed

Tools

TPT 14 WorkingDatabase and TargetTable getting crossed

I'm on Day 2 of learning TPT, so far so good, except TPT seems to be crossing the WorkingDatabase and TargetTable variables.

My setup:

1. Local Job Variables file:

TdpId = 'xxxxx',

UserName = 'xxxxx,

UserPassword = 'xxxxx',

TargetTable = 'BUB_LOAD',

WorkingDatabase = 'SND_PMRA',

DirectoryPath = '/sdlopr/teradata',

TextDelimiter = '|',

Format = 'Delimited',

OpenMode = 'Read'

2. Job Script:

DEFINE JOB load_sample

DESCRIPTION 'This is a sample load job'

(

        DEFINE SCHEMA bub_load

        (

                BUB_COL VARCHAR(4),

                BUB_COL1 VARCHAR(4)

        );

        DEFINE OPERATOR get_file

        DESCRIPTION 'This is the producer operator'

        TYPE DATACONNECTOR PRODUCER

        SCHEMA bub_load

        ATTRIBUTES

        (

                PrivateLogName = 'load_sample.log',

                DirectoryPath  = @DirectoryPath,

                FileName       = 'bub.txt',

                Format         = @Format,

                OpenMode       = @OpenMode,

                TextDelimiter  = @TextDelimiter

        );

        DEFINE OPERATOR load_file

        DESCRIPTION 'This is the consumer operator'

        TYPE LOAD

        /* Can use * if the input and output schema are the same */

        SCHEMA *

        ATTRIBUTES

        (

                 /* Only need to specify VARCHAR or INTEGER if not assigning a value */

                TdpId                   = @TdpId,

                UserName                = @UserName,

                UserPassword            = @UserPassword,

                TargetTable             = @TargetTable,

                WorkingDatabase         = @WorkingDatabase,

                LogTable                = @TargetTable || '.LG_Trans'

        );

   APPLY

        (

                'INSERT INTO ' || @TargetTable || '(BUB_COL, BUB_COL1) VALUES (:BUB_COL, :BUB_COL1);'

        )

        TO OPERATOR (load_file)

        SELECT * FROM OPERATOR (get_file);

);

3. Command: tbuild -f load_sample.txt -v local.jobvars -j bub1

When I run my command I get the following:

Teradata Parallel Transporter Version 14.00.00.08

Job log: /opt/teradata/client/14.00/tbuild/logs/bub1-150.out

Job id is bub1-150, running on sdlompa2

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

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

Teradata Parallel Transporter Load Operator Version 14.00.00.08

Teradata Parallel Transporter get_file: TPT19006 Version 14.00.00.08

load_file: private log not specified

get_file Instance 1 directing private log report to 'load_sample.log-1'.

get_file: TPT19008 DataConnector Producer operator Instances: 1

get_file: TPT19003 ECI operator ID: get_file-21349

get_file: TPT19222 Operator instance 1 processing file '/sdlopr/teradata/bub.txt'.

load_file: connecting sessions

load_file: TPT10508: RDBMS error 3802: Database ''BUB_LOAD'' does not exist.

load_file: disconnecting sessions

load_file: Total processor time used = '0.05 Second(s)'

load_file: Start : Fri Mar 15 16:16:18 2013

load_file: End   : Fri Mar 15 16:16:22 2013

get_file: TPT19221 Total files processed: 0.

Job step MAIN_STEP terminated (status 12)

Job bub1 terminated (status 12)

As you can see, BUB_LOAD is my TargetTable and not my WorkingDatabase.  To verify it's thinking my TargetTable is my WorkingDatabase, I changed the value to:

TargetTable = 'WHOAMI'

With the output being:

Teradata Parallel Transporter Version 14.00.00.08

Job log: /opt/teradata/client/14.00/tbuild/logs/bub1-151.out

Job id is bub1-151, running on sdlompa2

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

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

Teradata Parallel Transporter Load Operator Version 14.00.00.08

Teradata Parallel Transporter get_file: TPT19006 Version 14.00.00.08

load_file: private log not specified

get_file Instance 1 directing private log report to 'load_sample.log-1'.

get_file: TPT19008 DataConnector Producer operator Instances: 1

get_file: TPT19003 ECI operator ID: get_file-21480

get_file: TPT19222 Operator instance 1 processing file '/sdlopr/teradata/bub.txt'.

load_file: connecting sessions

load_file: TPT10508: RDBMS error 3802: Database ''WHOAMI'' does not exist.

load_file: disconnecting sessions

load_file: Total processor time used = '0.05 Second(s)'

load_file: Start : Fri Mar 15 16:17:55 2013

load_file: End   : Fri Mar 15 16:17:58 2013

get_file: TPT19221 Total files processed: 0.

Job step MAIN_STEP terminated (status 12)

Job bub1 terminated (status 12)

I'm sure I'm missing something here as I can't imagine TPT is actually crossing the variable values but I don't know what.  Any ideas?

2 REPLIES
Teradata Employee

Re: TPT 14 WorkingDatabase and TargetTable getting crossed

The problem is this line in the TPT job script:

               LogTable                = @TargetTable || '.LG_Trans'

The log table is a fully qualified table name with the target table name as the database name.

I think that was not your intention.

I believe this is your intention:

               LogTable                = @TargetTable || '_LG_Trans'

Re: TPT 14 WorkingDatabase and TargetTable getting crossed

That was it!!!  I would have never caught that, didn't even know what that was.  Thank you!!!