FastExport Example - FastExport

Teradata® FastExport Reference

Product
FastExport
Release Number
17.00
Published
September 30, 2020
Language
English (United States)
Last Update
2020-09-02
dita:mapPath
ups1544831946863.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2410
lifecycle
previous
Product Category
Teradata Tools and Utilities

The following FastExport job script example executes a single SELECT statement and returns the results to a data set on the client system:

.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       */