Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Sat, 28 Jun 2008 @ 11:33:26 GMT

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

Subj:   Re: Multiple files in fast load
From:   Victor Sokovin

  Is it possible to define multiple input files in one fastload session?  

I prefer to use "FastLoad job" rather than "FastLoad session" in this context. FastLoad opens a number of sessions specified by the SESSIONS command - I assume we are not talking about those here.

FastLoad only loads data in an empty table so in a way you can run only one successful job before you truncate or drop the table again, and it is possible to load data from multiple files within that job. One of the techniques is described in the manual in the "Running Multifile FastLoad Jobs" section. The idea is to use multiple scripts and terminate them with LOGOFF, not END LOADING. This causes FL to pause and restart the same job loading more and more files. When all of them are loaded END LOADING will commit all INSERTs. Throughout this chain of scripts the job will be using the same set of temporary tables and handling all failures and restarts as though you are using one source so it is very handy when the number of files may vary per job instance. You may start the first script and load the first file while other files are only starting to be transmitted by data providers. You can put all kind of logic in the wrapper script adding more FL scripts described above as they are required and then terminating the job when either all the data has been received and loaded or the scheduling deadline is reached.

If all data files are present by the time the job is about to start it is possible to simply concatenate all of them into one single file and use the simplest form of FL script. Should work just fine if the volumes are low and you don't need to tweak anything using multiple INSERT statements.

If simple concatenation is not possible for some reason then you could stream the data via a so called "named pipe", a special object which needs to be created on the FL client OS. To support this functionality the Teradata Named Pipes Access Module must be installed and specified in the FL script. Check the AXSMOD command in the FL manual for more details and examples for your OS.


  <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: 28 Jun 2020