Fast Load Format Binary Error

Database
Enthusiast

Fast Load Format Binary Error

Hello All,

I am importing a Binary file using Fast Load. I am getting a error. Please help me find the error

Script:

.LOGON jugal/jbhatt,jugal;

drop table DB.employees;

CREATE MULTISET TABLE DB.employees ,FALLBACK ,

NO BEFORE JOURNAL,

NO AFTER JOURNAL,

CHECKSUM = DEFAULT,

DEFAULT MERGEBLOCKRATIO

(

EmpId BIGINT NOT NULL,

DeptId INTEGER NOT NULL)

PRIMARY INDEX ( EmpId );

DROP TABLE DB.FastERR1;

DROP TABLE DB.FastERR2;

BEGIN LOADING DB.employees

ERRORFILES DB.FastERR1,

    DB.FastERR2;

SET RECORD BINARY;

DEFINE EmpId (CHAR(10)),

       DeptId (CHAR(10))

FILE=/jugal/jbhatt/binary.txt;

insert into DB.employees values(:EmpId,:DeptId);

END LOADING;

LOGOFF;

Logs:

$ fastload < FLoad.txt

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

     =                                                                 =

     =          FASTLOAD UTILITY     VERSION 14.00.00.07               =

     =          PLATFORM LINUX                                         =

     =                                                                 =

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

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

     =                                                                 =

     =          Copyright 1984-2012, Teradata Corporation.             =

     =          ALL RIGHTS RESERVED.                                   =

     =                                                                 =

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

**** 10:05:44 Processing starting at: Mon Apr  7 10:05:44 2014

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

     =                                                                 =

     =          Logon/Connection                                       =

     =                                                                 =

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

0001 .LOGON jugal/jbhatt,

**** 10:05:44 Teradata Database Release: 14.00.05.06

**** 10:05:44 Teradata Database Version: 14.00.05.07

**** 10:05:44 Number of AMPs available: 96

**** 10:05:44 Current CLI or RDBMS allows maximum row size: 64K

**** 10:05:44 Character set for this job: ASCII

0002 drop table DB.pricing_mbp_rte_scl;

**** 10:05:44 Command completed successfully

0003 CREATE MULTISET TABLE DB.Employees ,FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT,

     DEFAULT MERGEBLOCKRATIO

     (

     EmpId BIGINT NOT NULL,

     DeptId INTEGER NOT NULL)

     PRIMARY INDEX ( EmpId );

**** 10:05:44 Command completed successfully

0004 DROP TABLE DB.FastERR1;

**** 10:05:45 Command completed successfully

0005 DROP TABLE DB.FastERR2;

**** 10:05:45 Command completed successfully

0006 BEGIN LOADING DB.Employees

     ERRORFILES DB.FastERR1,

           DB.FastERR2;

**** 10:05:45 Session count 16 returned by the DBS overrides

              user-requested session count

**** 10:05:48 Number of FastLoad sessions connected = 16

**** 10:05:48 FDL4808 LOGON successful

**** 10:05:48 Number of AMPs available: 96

**** 10:05:48 BEGIN LOADING COMPLETE

0007 SET RECORD BINARY;

**** 10:05:48 Now set to read 'BINARY' records

**** 10:05:48 Command completed successfully

0008 DEFINE EmpId (CHAR(18)),

            DeptId (CHAR(18))

     FILE=/jugal/jbhatt/binary.txt;

**** 10:05:48 FDL4803 DEFINE statement processed

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

     =                                                                 =

     =          Insert Phase                                           =

     =                                                                 =

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

0009 insert into DB.Employees values(:EmpId,:DeptId);

**** 10:05:48 Number of recs/msg: 1567

**** 10:05:48 Starting to send to RDBMS with record 1

**** 10:05:48 RECORD is too short by 24 byte(s)

**** 10:05:48 FDL4830 CHAR/BYTE Type - record too short


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

     =                                                                 =

     =          Logoff/Disconnect                                      =

     =                                                                 =

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

**** 10:05:48 Logging off all sessions

**** 10:05:50 Total processor time used = '1.86 Seconds'

     .        Start : Mon Apr  7 10:05:44 2014

     .        End   : Mon Apr  7 10:05:50 2014

     .        Highest return code encountered = '12'.

**** 10:05:50 FastLoad Paused

1 REPLY
Enthusiast

Re: Fast Load Format Binary Error

I think the error is the DEFINE KEYWORD. I think i have not given a proper length for the columns EmpId and DeptId. I am right?