All Forums Tools
teradataguy 6 posts Joined 01/08
27 Feb 2008
fastload script insert phase error.

Hi all teradata gurus,This fastload example gives an error in the as shown below, any ideas how to correct it,**** 15:35:51 Number of recs/msg: 414**** 15:35:51 Starting to send to RDBMS with record 1**** 15:35:51 I/O Error on File Read: 35, Text: EOF encountered before end of recordName of records file is with data as shown below,|10021 |Brown, Jo |200|2312|Development |63000.00 |20|Jan 01 1955|F| |M|16| 0||10001 |Jones, Bill |100|5376|President |83000.00 |15|Jan 01 1960|M| |M|14| 0||10002 |Smith, Jim |100|4912|Sales |73000.00 |10|Jan 01 1970|M| |M|13| 1||10028 |Lee, Sandra |200|5844|Support |77000.00 | 4|Jan 01 1971|F| |M|18| 0||10029 |Berg, Andy |200|2312|Test |67000.00 |10|Jan 01 1967|M| |M|15| 0||10023 |Ayer, John |300|4432|Accounting |52000.00 | 8|Jan 01 1965|M| |M|13| 0| as shown below,.logon uname,pwd;CREATE TABLE employ (EmpNo SMALLINT NOT NULL,Name VARCHAR(12),DeptNo SMALLINT,PhoneNo SMALLINT,JobTitle VARCHAR(12),Salary DECIMAL(8,2),YrsExp BYTEINT,DOB DATE,Sex CHAR(1) UPPERCASE,Race CHAR(1) UPPERCASE,MStat CHAR(1) UPPERCASE,EdLev BYTEINT,HCap BYTEINT)UNIQUE PRIMARY INDEX(EmpNo);.begin loading employ errorfiles emperr1,emperr2 checkpoint 10000;set record vartext "|";defineEmpNo(varchar(9)),Name(varchar(12)), DeptNo(varchar(13)), PhoneNo(varchar(4)), JobTitle(varchar(12)), Salary(varchar(19)), YrsExp(varchar(12)), DOB(varchar(11)), Sex(varchar(11)), Race(varchar(11)), MStat(varchar(11)), EdLev(varchar(12)), HCap(varchar(12))file=emps.txt;insert into employ values (:EmpNo,:Name,:DeptNo,:PhoneNo,:JobTitle,:Salary,: YrsExp,:DOB,:Sex,:Race,:MStat,:EdLev,:HCap);.end loading;.logoff;thanx all in advancergrdsterdataguy

nithyanandam 65 posts Joined 10/04
05 Mar 2008

Insert a carriage return {ENTER} after the last record and try again.

teradataguy 6 posts Joined 01/08
10 Mar 2008

hi nithyanand,i tried with entering a Carriage Return at the end of the last record but it still DOES NOT work.thnx

myls 1 post Joined 02/08
06 Apr 2008

Option 1:if you are creating data file in a notepad ..make sure you have an end charater after last '|' for End of lineOption 2:set record text "|";Options 3:|10021 |Brown, Jo |200|2312|Development |63000.00 |20|Jan 01 1955|F| |M|16| 0| |10001 |Jones, Bill |100|5376|President |83000.00 |15|Jan 01 1960|M| |M|14| 0| |10002 |Smith, Jim |100|4912|Sales |73000.00 |10|Jan 01 1970|M| |M|13| 1| Make sure the all column having same byte lenght as define'd ..Ex ..add after 10021 four byte space to make as CHAR(9) as defined.Options 4:Try all three options it should workMyls

17 Dec 2008

give set record vartext display_errors "|";hope, it will work.

sRavanSarma 23 posts Joined 11/08
17 Dec 2008

Hi Bala chandra,i tried to run the script by following what u saidset record vartext display_errors "|";but,there were some errors ,*** Expected DISPLAY_ERRORS, NOSTOP or a valid delimiter after a vartext keyword*** Command Not processed

abhs50 1 post Joined 01/10
26 Feb 2010

you need to press (Enter) on the last record.Because on the last record Fastload fails to find a EOF character & terminates abruptly.So you need to press Enter Sample data :1,abhi2,hjjk3,iiiii (Press Enter over here ) I hope this works ...

anjunair 13 posts Joined 04/12
06 Aug 2012

Hi,

 

I have had a similar issue, and adding an Enter after the last record  solved it .

 

Thanks!

anjunair 13 posts Joined 04/12
07 Aug 2012

But I'm getting a  unique issue...I have 543895 records and only 543894 are getting loaded into my table using fastload.

 

 

 Total Records Read              =  543895

     Total Error Table 1             =  0  ---- Table has been dropped

     Total Error Table 2             =  0  ---- Table has been dropped

     Total Inserts Applied           =  543894

     Total Duplicate Rows            =  1

 

I have used UTF -8 encoding in my file and also inserted a newline after the last record. 

 

Pls help !

You must sign in to leave a comment.