Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 03 Feb 2007 @ 11:18:47 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Multiple file inputs to PC Fastload
 
From:   Chakrapani, Praveen

Hi Alan,

If you have multipe source files for a fastload job then first you have to pause the fastload job using LOGOFF command(don't include END LOADING command) then again LOGON and include BEGIN LOADING, DEFINE, INSERT statements for the second source file. Repeat the same for all source files and finally complete the loading using END LOADING and LOGOFF command.

Simple example from Fastload Ref Manual:

     /* Initiating the FastLoad Job and Loading the First Data Source */

     LOGON tdpid/jwt,smart ;
     DROP TABLE Fast_Table ;
     DROP TABLE Error_1 ;
     DROP TABLE Error_2 ;
     CREATE TABLE Fast_Table (col1 (char(5),
     col2(integer)) ;
     BEGIN LOADING Fast_Table ERRORFILES Error_1, Error_2 ;
     DEFINE Field_1 (char(5)), Field_2 (integer)
     FILE = FirstFile ;
     INSERT INTO Fast_Table (col1, col2) VALUES
     (:Field_1, :Field_2) ;
     LOGOFF ;

     /* Restarting the FastLoad Job and Loading the Second Data Source */

     LOGON tdpid/jwt,smart ;
     BEGIN LOADING Fast_Table ERRORFILES Error_1, Error_2 ;
     DEFINE Field_1 (char(5)), Field_2 (integer)
     FILE = SecondFile ;
     INSERT INTO Fast_Table (col1, col2)
     VALUES (:Field_1, :Field_2) ;
     LOGOFF ;

     /* Restarting the FastLoad Job and Loading the Third Data Source */

     LOGON tdpid/jwt,smart ;
     BEGIN LOADING Fast_Table ERRORFILES Error_1, Error_2 ;
     DEFINE Field_1 (char(5)), Field_2 (integer)
     FILE = ThirdFile ;
     INSERT INTO Fast_Table (col1, col2)
     VALUES (:Field_1, :Field_2) ;
     LOGOFF ;

     /* Terminating the FastLoad Job */

     LOGON tdpid/jwt,smart ;
     BEGIN LOADING Fast_Table ERRORFILES Error_1, Error_2 ;
     END LOADING ;
     LOGOFF ;

Regards,

Praveen



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023