Monday, September 5, 2011

FastLoad Example


A FastLoad Example in its Simplest Form

The load utilities often scare people because there are many things that appear complicated. In actuality, the load scripts are very simple. Think of FastLoad as:
·       Logging onto Teradata
·       Defining the Teradata table that you want to load (target table)
·       Defining the INPUT data file
·       Telling the system to start loading
This first script example is designed to show FastLoad in its simplest form. The actual script is in the left column and our comments are on the right.
Logon CDW/jones, cowboys;
LOGON TO TERADATA
image\img00378.gif
Creates the department target table in the sql101 database in Teradata
/* in this sample script, the create shows what the table looks like, however, this is not a good practice in a production script */
image\img00379.gif
Defines the fields in the record for the flat file being read and FILE= provides the name the input file
image\img00380.gif
Specifies table to load for locking purposes, names the error tables and sets the checkpoint for restart processing to 15000.
image\img00381.gif
The INSERT used to populate the table
END LOADING;
Tells FastLoad to begin Phase 2
LOGOFF;
Disconnects the Teradata sessions

No comments:

Post a Comment