TPT Error using DATACONNECTOR PRODUCER Operator

Tools
Enthusiast

TPT Error using DATACONNECTOR PRODUCER Operator

Hi All,

Please help me where I am going wrong. The error im getting is relating to the FileName given.

This is the First time i am using TPT.

Below is the TPT Script:

DEFINE JOB FlatJOBS

DESCRIPTION 'FLAT FILE FORMAT'

(

DEFINE SCHEMA Schemas

DESCRIPTION 'Schemas'

(

EmpId INTEGER,

EmpName VARCHAR(10)

);

DEFINE OPERATOR FlatOp

DESCRIPTION 'Schemas'

TYPE DATACONNECTOR PRODUCER

SCHEMA Schemas

ATTRIBUTES

(

varchar FileName='/home/jugal/Flat.txt',

varchar OpenMode='Read',

varchar FORMAT='FORMATTED'

);

DEFINE OPERATOR LoadOp

DESCRIPTION 'LoadOp'

TYPE LOAD

SCHEMA Schemas

ATTRIBUTES

(

    VARCHAR PrivateLogName = 'DB.employees_trg_log',

    INTEGER MaxSessions    = 32,

    INTEGER MinSessions,

    VARCHAR TargetTable    = 'DB.MLOAD_INPUT_INSERT',

    VARCHAR TdpId          = 'jugal.dev.com',

    VARCHAR UserName       = 'jbhatt',

    VARCHAR UserPassword   = 'jugal',

    VARCHAR ErrorTable1    = 'DB.employees_ERRTABLE1_ap',

    VARCHAR ErrorTable2    = 'DB.employees_ERRTABLE2_ap',

    VARCHAR LogTable       = 'DB.employees_LOGTABLE_ap'

);

APPLY

('INSERT INTO DB.MLOAD_INPUT_INSERT (:EmpId,:EmpName)')

TO OPERATOR(LoadOp [4])

SELECT * FROM OPERATOR (FlatOp);

);

Below is how i gave the data FileName

Flat.txt:

100,'Jugal'

101,'Bhatt'

Logs:

$ tbuild -f FlatEmp.txt

Teradata Parallel Transporter Version 14.00.00.08

Job log: /opt/teradata/client/14.00/tbuild/logs/jbhatt-354.out

Job id is jb956714-354, running on urh00022.jugal.com

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

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

Teradata Parallel Transporter FlatOp: TPT19006 Version 14.00.00.08

FlatOp: TPT19008 DataConnector Producer operator Instances: 1

Teradata Parallel Transporter Load Operator Version 14.00.00.08

LoadOp: private log specified: UI_RESULTS_DB.employees_trg_log

FlatOp: TPT19003 ECI operator ID: FlatOp-1169

FlatOp: TPT19222 Operator instance 1 processing file '/home/jugal/Flat.txt'.

LoadOp: connecting sessions

LoadOp: preparing target table

LoadOp: entering Acquisition Phase

FlatOp: TPT19350 I/O error on file '/home/jugal/Flat.txt'.

FlatOp: TPT19416 pmRead failed. Unexpected data format (16)

FlatOp: TPT19305 Fatal error reading data.

FlatOp: TPT19221 Total files processed: 0.

LoadOp: disconnecting sessions

LoadOp: Total processor time used = '2.01 Second(s)'

LoadOp: Start : Wed Mar 26 14:47:21 2014

LoadOp: End   : Wed Mar 26 14:47:25 2014

Job step MAIN_STEP terminated (status 12)

Job jbhatt terminated (status 12)

Tags (1)
8 REPLIES
Enthusiast

Re: TPT Error using DATACONNECTOR PRODUCER Operator

is the header existing in the file supplied.EMPID not being an integer might be causing the issue.

Enthusiast

Re: TPT Error using DATACONNECTOR PRODUCER Operator

Hi Krishhan,

Below is the DDL:

CREATE MULTISET TABLE DB.MLOAD_INPUT_INSERT ,NO FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT,

     DEFAULT MERGEBLOCKRATIO

     (

      Empid INTEGER,

      EmpName VARCHAR(5) CHARACTER SET LATIN CASESPECIFIC)

PRIMARY INDEX ( Empid );

Teradata Employee

Re: TPT Error using DATACONNECTOR PRODUCER Operator

"Formatted" is a binary format that consists of a 2-byte record length ('n'), followed by 'n' bytes of data, followed by an end-of-record marker.

Your data format does not match that.

You might be thinking of "delimited" format (just based on the data you provided), where you can have comma-separated data.

However, unless you enable the QuotedData feature, the single quotes you show for column 2 will be considered part of the data.

-- SteveF
Enthusiast

Re: TPT Error using DATACONNECTOR PRODUCER Operator

Hi Feinholz,

I applied "Delimited" Format with the TextDelimiter=','. I also made the changges in SCHEMA EmpId VARCHAR(10).

Below is the changes in the Script:

DEFINE SCHEMA Schemas

DESCRIPTION 'Schemas'

(

EmpId VARCHAR(10),

EmpName VARCHAR(10)

);

DEFINE OPERATOR FlatOp

DESCRIPTION 'Schemas'

TYPE DATACONNECTOR PRODUCER

SCHEMA Schemas

ATTRIBUTES

(

varchar FileName='/home/jugal/Flat.txt',

varchar OpenMode='Read',

varchar FORMAT='DELIMITED',

VARCHAR TextDelimiter=','


);

Flat.txt: 

100,'Jugal'

101,'Bhatt'

Logs:

LoadOp: entering Acquisition Phase

FlatOp: TPT19222 Operator instance 1 processing file '/home/jugal/Flat.txt

FlatOp: TPT19350 I/O error on file '/home/jugal/Flat.txt'.

FlatOp: TPT19435 pmRead failed. EOF encountered before end of record (35)

FlatOp: TPT19305 Fatal error reading data.

LoadOp: disconnecting sessions

FlatOp: TPT19221 Total files processed: 0.

Teradata Employee

Re: TPT Error using DATACONNECTOR PRODUCER Operator

That is a different issue than the first one you reported.

This one is a known issue and is being fixed.

It happens because you do not have a newline (end-of-record marker) after the last record in the file.

If you add one, your job should run fine.

-- SteveF
Enthusiast

Re: TPT Error using DATACONNECTOR PRODUCER Operator

Feinholz,

I have entered the data with the end of record marker. When i entered the 1st record. I clicked on ENTER button and the 2nd set of record was included. But still this error persist.

And in the DATACONNECTOR PRODUCER if i use the FORMAT as "FORMATTED", then in the Import File i should enter the records as follows:

Flat.txt

10'0',Ju'gal'

10'1',Bh'att'

I am i right?

Enthusiast

Re: TPT Error using DATACONNECTOR PRODUCER Operator

Feinholz,

For the issue i was facing for FORMAT "delimited" is working fine. Please help me understand the "FORMATTED" type with an example.

It would be very helpfull.

Thank,

Jugal

Teradata Employee

Re: TPT Error using DATACONNECTOR PRODUCER Operator

Well, I cannot show you an example because the data is in binary.

Our supported record formats are well documented.

Please refer to the TPT documentation.

The record format called "FORMATTED" consists of:

2-byte record length indicator ("n")

"n" bytes of data

end-of-record marker (1-byte or 2-bytes depending on the platform)

-- SteveF