FastExport

FastExport is a computer program released by the company Teradata. The program is the reverse of the Teradata FastLoad. FastExport is a utility that exports large data sets from Teradata tables or views to a client system for processing, generating large reports, or for loading data into a smaller database. FastExport can export data to both channel- or network-attached client systems. The program also provides session control and data handling specifications for the data transfer operations. The program is available for various operating systems, including Microsoft Windows and Red Hat Linux.

Usage

FastExport is a command-driven utility that uses multiple sessions to quickly transfer large amounts of data from tables and views of the Teradata Relational Database Management System (RDBMS) to a client-based application.
Users can export data from any table or view to which you have the SELECT access privilege. The destination for the exported data can be:
  • A file on a channel-attached or network-attached client system
  • An Output Modification (OUTMOD) routine written to select, validate, and preprocess the exported data



A Sample Script

.LOGTABLE utillog;                  /*define restart log */

.LOGON tdpz/user,pswd;              /*DBC logon string */

.BEGIN EXPORT                       /*specify export function */
SESSIONS 20;                        /*number of sessions to be used */

.LAYOUT UsingData;                  /*define the input data */
.FIELD ProjId * Char(8);            /*values for the SELECT */
.FIELD WkEnd * Date;                /*constraint clause. */

.IMPORT INFILE ddname1              /*identify the file that */
LAYOUT UsingData;                   /*contains the input data */

.EXPORT OUTFILE ddname2;            /*identify the destination */
                                    /*file for exported data */
                                    
SELECT EmpNo, Hours FROM CHARGES    /*provide the SQL SELECT */
WHERE WkEnd = :WkEnd                /*statement with values */
AND Proj_ID = :ProjId               /*provided by the IMPORT */
ORDER BY EmpNo;                     /*command */

.END EXPORT;                        /*terminate the export */
                                    /* operation */
                                    
.LOGOFF;                            /*disconnect from the DBS */




/* ---------------------------------------------------------------*/
/* @(#) FASTEXPORT SCRIPT                                  */
/* @(#) Version 1.1                                                */
/* @(#) Created by CoffingDW                              */
/* ---------------------------------------------------------------*/
ALWAYS GOOD TO IDENTIFY THE SCRIPT AND AUTHOR IN COMMENTS
/* Setup the Fast Export Parameters */
.LOGTABLE SQL01.CDW_Log;
.LOGON CDW/SQL01,whynot;
CREATE LOGTABLE AND LOGON;
.BEGIN EXPORT
SESSIONS 12;
BEGIN EXPORT STATEMENT.
SESSIONS 12;
.EXPORT OUTFILE Join_Export.txt
MODE RECORD FORMAT TEXT;
DEFINES THE OUTPUT FILE NAME. IN ADDITION, SPECIFIES THE OUTPUT MODE AND FORMAT(LAN – ONLY) MODE RECORD FORMAT TEXT;
image\img00376.gif
THE SELECT PULLS DATA FROM TWO TABLES. IT IS GOOD TO QUALILY WHEN DOING A TWO-TABLE JOIN.
/* Finish the Export Job and Write to File */
.END EXPORT;
.LOGOFF;
END THE JOB AND LOGOFF TERADATA;