Fastload error : Not enough fields in vartext data record

Tools

Fastload error : Not enough fields in vartext data record

I have written a fastexport to export data with 'FORMAT text MODE record'. I get some extra bytes (^_^@)at the begining of each record. That is creating problem in loading the file. If i remove it, load works fine.

my exported data:

^_^@2011-11-01|2011-11-02 16:23:09

^_^@2011-11-01|2011-11-02 16:23:09

^_^@2011-11-01|2011-11-02 16:23:09

in the export , i have Date field and timestamp filed.

In the fload , i have specified :

DEFINE

      PAGE_VIEW_DT (VARCHAR(50)) ,

      DW_LOAD_TS (VARCHAR(50))

insert into  idw_bkup.WEB_PAGE_VIEW_T_stage1

(

PAGE_VIEW_DT  ,

DW_LOAD_TS

)

values

(

:PAGE_VIEW_DT  ,

:DW_LOAD_TS

);

I get an error : Not enough fields in vartext data record 1

Please help !!

2 REPLIES
N/A

Re: Fastload error : Not enough fields in vartext data record

can you please share the fastexport and fastload script.

you need to allign the export mode and format.

Re: Fastload error : Not enough fields in vartext data record

can't really share the scripts...

i have used .SET RECORD VARTEXT "|";

in the fload.

in the fastexport i am using

.EXPORT OUTFILE fexp.bat FORMAT text MODE record;

locking ROW for access

Sel

trim(

cast(

      trim(cast(VIEW_DT as varchar(50))) || '|' ||

      trim(cast(LOAD_TS as varchar(50)))  as varchar(2100) ) )

      from

tablename;

The export script:

.SET RECORD VARTEXT "|";

drop tableerr1;

drop table err2;

DEFINE

        VIEW_DT (VARCHAR(50)) ,

      LOAD_TS (VARCHAR(50))

FILE=fexp.bat;

begin loading stage_tab

errorfiles err1,err2

checkpoint 0 ;

insert into  stage_tab

(

VIEW_DT  ,

LOAD_TS

)

values

(

:VIEW_DT  ,

:LOAD_TS

);