All Forums Tools
abidmanzoor 2 posts Joined 07/06
17 Jul 2006
Problem in fast load (Urgent)

Dear All,I am totally new in Teradata. I have problem in fastload.I have a data file containing following information100,59,PEARL HEART LOCKET,285,1,40.99,4/11/2005101,63,HARRY POTER,286,1,$40.99,4/11/2005102,59,PEARL HEART LOCKET, 286,1,$40.99,4/11/2005103,42,CK ONE SUMMER FOR, 287,1,$34.95, 4/11/2005106,42,CK ONE SUMMER, 288,1,$34.95, 4/13/2005and have following script.sessions 2;.errlimit 50;.LOGON DemoTDAT/dbc,dbc;.set record textDATABASE ez;DROP table CartLine1;drop table CartLine1_ERR1;drop table CartLine1_ERR2;CREATE TABLE CartLine1 ( Cart_item_id varChar(10), Product_id varChar(4), Product_Name char(20), Cart_id varChar(5), quantity varChar(5), total_price varChar(5), date1 varChar(5));DEFINE Cart_item_id (varChar(10)), FILLER1 (CHAR(1)), Product_id (varChar(4)), FILLER2 (CHAR(1)), Product_Name (char(20)), FILLER3 (CHAR(1)), Cart_id (varChar(5)), FILLER4 (CHAR(1)), quantity (varChar(5)), FILLER5 (CHAR(1)), total_price (varChar(5)), FILLER6 (CHAR(1)), date1 (varChar(5))FILE=C:\data.txt;BEGIN LOADING CartLine1ERRORFILES CartLine1_ERR1, CartLine1_ERR2CHECKPOINT 10;INSERT INTO CartLine1( Cart_item_id, Product_id, Product_Name, Cart_id, quantity, total_price, date1)VALUES( :Cart_item_id, roduct_id, roduct_Name, :Cart_id, :quantity, :total_price, :date1);END LOADING;.LOGOFF;when i execute it on fastload got following massages********************************************** ***************************=========================== ========= == Insert Phase == ====================================0010 INSERT INTO CartLine1 ( Cart_item_id, Product_id, Product_Name, Cart_id, quantity, total_price, date1 ) VALUES ( :Cart_item_id, roduct_id, roduct_Name, :Cart_id, :quantity, :total_price, :date1 );**** 17:03:36 Number of recs/msg: 973**** 17:03:36 Starting to send to RDBMS with record 1**** 17:03:36 Bad file or data definition.**** 17:03:36 The length of: CART_ITEM_ID in row: 1 was greater than defined. Defined: 10, Received: 12337 ==================================== == Logoff/Disconnect == ====================================**** 17:03:36 Logging off all sessions**** 17:03:36 Total processor time used = '0.015625 Seconds' . Start : Tue Jul 18 17:00:04 2006 . End : Tue Jul 18 17:03:36 2006 . Highest return code encountered = '0' .***************************************************** ************************Please help me in this regard.I think there is problem in data and script. Please correct it.ThanksABID

17 Jul 2006

try thisset record vartext "|" NOSTOP;sessions 2;.errlimit 50;.LOGON DemoTDAT/dbc,dbc;.set record textDATABASE ez;DROP table CartLine1;drop table CartLine1_ERR1;drop table CartLine1_ERR2;CREATE TABLE CartLine1 (Cart_item_id varChar(10),Product_id varChar(4),Product_Name char(20),Cart_id varChar(5),quantity varChar(5),total_price varChar(5),date1 varChar(5));set record vartext "," NOSTOP;DEFINECart_item_id (varChar(10)),Product_id (varChar(4)),Product_Name (varchar(20)),Cart_id (varChar(5)),quantity (varChar(5)),total_price (varChar(5)),date1 (varChar(5))FILE=C:\data.txt;The rest of the stuff remains same.the set record vartext "," defines the delimeter , and tells that it is not a fixed lenght fileand all the fields should be defined as VARCHAR [there are a few exceptions though)try this and see.

abidmanzoor 2 posts Joined 07/06
18 Jul 2006

Its work............Thanks you very much Feroz Shaik sb.

You must sign in to leave a comment.