TPT Failure : Output schema mismatch - Output varies from Server to Server.

Tools & Utilities
Enthusiast

TPT Failure : Output schema mismatch - Output varies from Server to Server.

Hi All, 

I am facing a strange issue with TPT script, I am trying to run TPT script against the same table in 2 different servers.

In the First Server :

1. TPT executes fine with no issues and exports data to a file.

2. The version of TPT in this server is - Teradata Parallel Transporter Version 14.10.00.10

In the Second Server :

1. TPT executes and fails with the following error - TPT_INFRA: TPT02638: Error: Conflicting data length for column(1) - DivCd. Source column's data length (12) Target column's data length (36).

EXPORT_OPERATOR: TPT12108: Output Schema does not match data from SELECT statement

2. The version of TPT in this server is - Teradata Parallel Transporter Version 14.10.00.11

I guessed this might be due to Unicode issue and have also tried increasing the length to 3 times higher than that of the one defined in the table.

I could not figure out other differences apart from the difference in the version of TPT in these server. Could you please provide some pointers on this.

I have also attached the copy of the TPT file. Request your inputs.

TPT Script :

DEFINE JOB EXPORT_EXP_TABLE_TO_FILE

DESCRIPTION 'EXPORT EXP TABLE TO A FILE'

(

/*****************************/

DEFINE SCHEMA EXP_SCHEMA

DESCRIPTION 'SAMPLE EXP SCHEMA'

(

Col1 Varchar(12) , Col2 Varchar(40) , Col3 Varchar(4) , Col4 Varchar(4) , Col5 Varchar(10) , Col6 Varchar(10) , Col7 Varchar(120) , Col8 Varchar(10)

);

/*****************************/

/*****************************/

DEFINE OPERATOR FILE_WRITER()

DESCRIPTION 'TERADATA PARALLEL TRANSPORTER DATA CONNECTOR OPERATOR'

TYPE DATACONNECTOR CONSUMER

SCHEMA *

ATTRIBUTES

(

VARCHAR PrivateLogName    = 'file_writer_privatelog',

VARCHAR FileName          = 'exp.tsv',

VARCHAR IndicatorMode     = 'N',

VARCHAR OpenMode          = 'Write',

VARCHAR Format = 'DELIMITED',

VARCHAR TextDelimiter = 'TAB',

VARCHAR TRACELEVEL='ALL'

);

/*****************************/

/*****************************/

DEFINE OPERATOR EXPORT_OPERATOR()

DESCRIPTION 'TERADATA PARALLEL TRANSPORTER EXPORT OPERATOR'

TYPE EXPORT

SCHEMA EXP_SCHEMA

ATTRIBUTES

(

VARCHAR PrivateLogName    = 'export_privatelog',

INTEGER MaxSessions       =  32,

INTEGER MinSessions       =  1,

VARCHAR TdpId             = 'TDPID',

VARCHAR UserName          = 'MyUserName',

VARCHAR UserPassword      = 'MyPassword',

VARCHAR AccountId,

VARCHAR SelectStmt        = 'select

cast (Col1 as Varchar(12)), cast (Col2 as Varchar(40)), cast (Col3 as Varchar(4)), cast (Col4 as Varchar(4)), cast (Col5 as Varchar(10)), cast (Col6 as Varchar(10)), cast (Col7 as Varchar(120)), cast (Col8 as Varchar(10))

from MyDbName.MyTableName ; '

);

/*****************************/

STEP export_to_file

(

APPLY TO OPERATOR (FILE_WRITER() )

SELECT * FROM OPERATOR (EXPORT_OPERATOR() [1] );

);

);

Regards,

Srivignesh KN

1 REPLY
Teradata Employee

Re: TPT Failure : Output schema mismatch - Output varies from Server to Server.

Please provide the DDL of the source table.

I notice that the script is not indicating the use of the UTF8 client session character set, so not sure how Unicode could affect this, but the table definition might give a clue.

-- SteveF