FastExport Example - FastExport

Teradata FastExport Reference

Product
FastExport
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
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       */