TPT error 13 in finalizing the table schema definition(SELECTOR OPERATOR)

Tools

TPT error 13 in finalizing the table schema definition(SELECTOR OPERATOR)

All,

My Table:

show table dba_backup.customer_tbl

CREATE MULTISET TABLE dba_backup.customer_tbl ,FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT

     (

      custno INTEGER,

      custname VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC,

      mob BIGINT)

UNIQUE PRIMARY INDEX ( custno );

I am trying to export above table to file(DELIMITED) using SELECTOR OPERATOR. PFB My Script:

DEFINE JOB Export_to_File

DESCRIPTION 'EXPORT TO FILE'

(

DEFINE SCHEMA CUST_SCHEMA

(

CUSTNO VARCHAR(20),

CUSTNAME VARCHAR(20),

MOB VARCHAR(20)

);

DEFINE OPERATOR DATA_CONNECTOR

TYPE DATACONNECTOR CONSUMER

SCHEMA CUST_SCHEMA

ATTRIBUTES

(

VARCHAR FileName='C:\TD Utilities\Exported Files\SELECTOR_TEXT.txt',

VARCHAR Format = 'DELIMITED',

VARCHAR OpenMode = 'Write',

VARCHAR IndicatorMode = 'N',

VARCHAR TextDelimiter = '|'

);

DEFINE OPERATOR EXPORT_CUST

TYPE SELECTOR

SCHEMA CUST_SCHEMA

ATTRIBUTES

(

VARCHAR UserName = 'tduser',

VARCHAR UserPassword = 'tduser',

VARCHAR TdpId = '127.0.0.1',

VARCHAR SelectStmt = 'SELECT custno,custname,mob FROM DBA_BACKUP.CUSTOMER_TBL;'

);

APPLY TO OPERATOR (DATA_CONNECTOR[1])

SELECT custno,custname,mob FROM OPERATOR (EXPORT_CUST[1]);

);

O/P:

TPT error 13 in finalizing the table schema definition

I have referred  other posts where its mentioned that "we enforce that the schema definition must match the data coming from the database (exactly)"

or we need to change scehma defination etc.

Can you please guide how to do it?

I have provided my table source and script also.

Awaiting response.....

Thanks,

Tushar

6 REPLIES

Re: TPT error 13 in finalizing the table schema definition(SELECTOR OPERATOR)

+ Character Set : ASCII

Teradata Employee

Re: TPT error 13 in finalizing the table schema definition(SELECTOR OPERATOR)

I believe in the other posts, it was point out that if you want the Selector operator to return data in VARCHAR format, you need to enable the ReportModeOn feature.

Please check the documentation for how to enable that feature.

-- SteveF

Re: TPT error 13 in finalizing the table schema definition(SELECTOR OPERATOR)

WOW.... It works!!! Amezing!!! Thanks Steve for pointing out correct feature. 

Teradata Employee

Re: TPT error 13 in finalizing the table schema definition(SELECTOR OPERATOR)

How did you enable ReportModeOn?

Teradata Employee

Re: TPT error 13 in finalizing the table schema definition(SELECTOR OPERATOR)

Via the ReportModeOn attribute for the Selector operator.

Please refer to the documentation.

-- SteveF
Teradata Employee

Re: TPT error 13 in finalizing the table schema definition(SELECTOR OPERATOR)

Thank you Steve.