Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

Tools & Utilities
Highlighted
Enthusiast

Re: Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

Hi All,

I am unable to create new thread. Where is the option to create new  thread.

 

Please help me 

 

Thank you so much in advance

 

Regards,

Mallik

Enthusiast

Re: Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

Hi All,

Thanks you so much, i found option to create new thread.

Thanks,

Malli

Not applicable

Re: Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

Hi,

im the below export script to export data, below is the .txt  data

.IMPORT VARTEXT '|' FILE=D:\REPAUTO\Archivos_Base\schtasks.txt

.QUIET ON

.REPEAT *

USING(

      HOSTNAME VARCHAR(25),

      TASKNAME VARCHAR(200) , ---

      NEXTRUN VARCHAR(50) ,

      STATUS VARCHAR(30) ,

      LOGONMODE VARCHAR(50) ,

      LASTRUN VARCHAR(50) ,

      LASTRESULT VARCHAR(50) ,

      AUTHOR VARCHAR(30) ,

      TASKRUN VARCHAR(200), --      

      STARTIN VARCHAR(100) , 

      COMMENTS VARCHAR(500) , -- 

      TASKSTATE VARCHAR(100) ,      

      IDLETIME VARCHAR(200) ,  

      POWERMANAG VARCHAR(200) , 

      RUNASUSER VARCHAR(80) ,

      DELETETASK VARCHAR(80) , 

      STOPTASK VARCHAR(200) , 

      SCHEDULE VARCHAR(100) ,

      SCHEDULETYPE VARCHAR(100) ,

      STARTTIME VARCHAR(60) ,

      STARTDATE VARCHAR(60) ,

      ENDDATE VARCHAR(60) ,

      DAYS VARCHAR(100) ,

      MONTHS VARCHAR(100) ,    

      R1 VARCHAR(50) ,

      R2 VARCHAR(50) ,

      R3 VARCHAR(50) ,

      R4 VARCHAR(50) 

)

INSERT INTO VISU.GI09203_DE_TAREAS_PROG_I

  (   HOSTNAME,

      TASKNAME,

      NEXTRUN,

      STATUS,

      LOGONMODE,

      LASTRUN,

      LASTRESULT,

      AUTHOR,     

      TASKRUN,

      STARTIN,

      COMMENTS,

      TASKSTATE,

      IDLETIME,

      POWERMANAG,

      RUNASUSER,

      DELETETASK,      

      STOPTASK,      

      SCHEDULE,

      SCHEDULETYPE,

      STARTTIME,

      STARTDATE,

      ENDDATE,

      DAYS,

      MONTHS,

      R1,

      R2,

      R3

  )

VALUES(

  trim(:HOSTNAME), 

  trim(:TASKNAME),

  trim(:NEXTRUN)

  ,trim(:STATUS)

  ,trim(:LOGONMODE)

  ,trim(:LASTRUN)

  ,trim(:LASTRESULT)

  ,trim(:AUTHOR)

  ,trim(:TASKRUN)

  ,trim(:STARTIN)

  ,trim(:COMMENTS)

  ,trim(:TASKSTATE)

  ,trim(:IDLETIME)

  ,trim(:POWERMANAG)

  ,trim(:RUNASUSER)

  ,trim(:DELETETASK)

  ,trim(:STOPTASK)

  ,trim(:SCHEDULE)

  ,trim(:SCHEDULETYPE)

  ,trim(:STARTTIME)

  ,trim(:STARTDATE)

  ,trim(:ENDDATE)

  ,trim(:DAYS)

  ,trim(:MONTHS)

  ,trim(:R1)

  ,trim(:R2)

  ,trim(:R3)

  );

.IF ERRORCODE <> 0 THEN .GOTO ENCONTRO_ERRORES

--------------------------------------------------------------------------------------------------------------

.LOGOFF

.QUIT 0

.LABEL ENCONTRO_ERRORES

.LOGOFF

.QUIT 1

 

im getting the error in the .log:

*** Failure 2673 The source parcel length does not match data that was defined.                Statement# 1, Info =6 

 *** Total elapsed time was 1 second.

 

Can anyone help me, please?

 

Regards,

Not applicable

Re: Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

I am also facing the same problem.

I am trying to upload CLOB from flat file to some table and constantly getting "parcel length error".

/* bteq script I am using */

.logon my_machine/usr,pass;

database dummy_db;

.IMPORT VARTEXT ',' LOBCOLS=1 FILE=arg_list.txt;

USING (case_id varchar(64), suite_id varchar(3), sql_text CLOB AS DEFERRED, result_row_cnt varchar(3))

INSERT INTO dummy_db.test_case(case_id, suite_id, sql_text, result_row_cnt) values(:case_id, :suite_id, :sql_text, :result_row_cnt);

.logoff;

.quit;

/* table I want to upload to*/

CREATE SET TABLE DUMMY_DB.test_case ,FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT,

     DEFAULT MERGEBLOCKRATIO

     (

      Case_ID VARCHAR(64) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,

      SQL_Text CLOB(2097088000) CHARACTER SET LATIN NOT NULL,

      suite_id VARCHAR(3) CHARACTER SET LATIN NOT CASESPECIFIC,

      result_row_cnt VARCHAR(3) CHARACTER SET LATIN NOT CASESPECIFIC)

UNIQUE PRIMARY INDEX ( Case_ID );

/* arg_list.txt that i am reading from contains*/

PCTRPT_DR103259_qryid001,5,PCTRPT_DR103259_qryid001.txt,0

where "PCTRPT_DR103259_qryid001.txt" file that contains very large text.

/* here is my bteq output */

BTEQ 15.00.00.01 Mon Apr 11 19:19:11 2016 PID: 10380

+---------+---------+---------+---------+---------+---------+---------+----

.logon my_machine/usr,

 *** Logon successfully completed.

 *** Teradata Database Release is 16p.00.00.58                  

 *** Teradata Database Version is 16p.00.00.58_dr179641br1_3      

 *** Transaction Semantics are BTET.

 *** Session Character Set Name is 'ASCII'.

 *** Total elapsed time was 3 seconds.

+---------+---------+---------+---------+---------+---------+---------+----

database dummy_db;

 *** New default database accepted.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IMPORT VARTEXT ',' LOBCOLS=1 FILE=arg_list.txt;

+---------+---------+---------+---------+---------+---------+---------+----

USING (case_id varchar(64), suite_id varchar(3), sql_text CLOB AS DEFERRED,

 result_row_cnt varchar(3))

INSERT INTO dummy_db.test_case(case_id, suite_id, sql_text, result_row_cnt

) values(:case_id, :suite_id, :sql_text, :result_row_cnt);

 *** Failure 2673 The source parcel length does not match data that was defi

 ned.

                Statement# 1, Info =4

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.logoff;

 *** You are now logged off from the DBC.

+---------+---------+---------+---------+---------+---------+---------+----

.quit;

 *** Exiting BTEQ...

 *** RC (return code) = 8

I have tried reading several post but couln`t understand what I am doing wrong.

I think I am making some mistake in loading CLOB file, BTW I am new to teradata so any help would be appreciated.

Thanks