Failure 2673 The source parcel length does not match data that was defined.

Tools

Failure 2673 The source parcel length does not match data that was defined.

Hi All,

I am new to teradata and working putting image files in teradata.I have successfully being able to do it using sql assistant.I was trying to check if i can do the same using BTEQ.I had been struggling with it and need your help and suggestions....

Here is my table which i created:
create table ALL_WKSCRATCHPAD_DB.devX_lob (
id varchar (80),
mime_type varchar (80),
binary_lob binary large object
)unique primary index (id);

The bteq file which i am using luks like ths:

.set width 132
.logon usrname,pwd

delete from ALL_WKSCRATCHPAD_DB.devX_lob all;

.import vartext ',' file='/temp/lob/lobjobbteq.txt';

.repeat *
using (lobFile blob as deferred, id varchar(40), lobType varchar(1), mimeType varchar(40))
insert into ALL_WKSCRATCHPAD_DB.devX_lob (id, mime_type, binary_lob)
values (:id, :mimeType, :lobFile);
.quit

====================================================

my lobjobbteq.txt looks like this:

/temp/lob/thumbs down.gif,thumbsdown.gif,B,image/gif
/temp/lob/thumbs up.gif,thumbsup.gif,B,image/gif
/temp/lob/crying.gif,crying.gif,B,image/gif
/temp/lob/small.pdf,small.pdf,B,application/pdf

I am getting the following error when i am logging in:

import vartext ',' file='/temp/lob/lobjobbteq.txt';
BTEQ -- Enter your DBC/SQL request or BTEQ command:

.repeat *
BTEQ -- Enter your DBC/SQL request or BTEQ command:
using (lobFile blob as deferred, id varchar(40), lobType varchar(1), mimeType varchar(40))
insert into ALL_WKSCRATCHPAD_DB.devX_lob (id, mime_type, binary_lob)
values (:id, :mimeType, :lobFile);
*** Starting Row 0 at Mon Jul 19 11:57:41 2010

*** Failure 2673 The source parcel length does not match data that was defined.
Statement# 1, Info =2
*** Total elapsed time was 1 second.

*** Failure 2673 The source parcel length does not match data that was defined.
Statement# 1, Info =2
*** Total elapsed time was 1 second.

*** Failure 2673 The source parcel length does not match data that was defined.
Statement# 1, Info =2
*** Total elapsed time was 1 second.

*** Failure 2673 The source parcel length does not match data that was defined.
Statement# 1, Info =2
*** Total elapsed time was 1 second.

*** Warning: Out of data.
*** Finished at input row 4 at Mon Jul 19 11:57:41 2010
*** Total number of statements: 4, Accepted : 0, Rejected : 4

*** Total elapsed time was 1 second.

*** Total requests sent to the DBC = 4
*** Successful requests per second = 4.000

BTEQ -- Enter your DBC/SQL request or BTEQ command:
.quit
*** You are now logged off from the DBC.
*** Exiting BTEQ...
*** RC (return code) = 8

If you could kindly take a look and suggest what exactly is going wrong would help me a lot!

Thanks
SG
1 REPLY
Teradata Employee

Re: Failure 2673 The source parcel length does not match data that was defined.

LOBCOLS option needed on the IMPORT statement.
The thread continued here...
http://developer.teradata.com/applications/articles/large-objects-part-1-loading