Writing a FastExport Job Script - FastExport

Teradata® FastExport Reference

Product
FastExport
Release Number
17.10
Published
June 2021
Language
English (United States)
Last Update
2021-07-01
dita:mapPath
qja1608578437326.ditamap
dita:ditavalPath
gel1618411995444.ditaval
dita:id
B035-2410
lifecycle
previous
Product Category
Teradata Tools and Utilities
A complete FastExport job includes:
  • Invoking FastExport
  • Logging on to the database and establishing the FastExport support environment
  • Specifying the FastExport tasks
  • Logging off from the database and terminating FastExport
  1. Invoke FastExport, specifying desired runtime options:
    • Normal or abbreviated (brief) printout
    • Character set
    • Session limits
    • Alternate error message file
    • Standard input file/device
    • Standard output file/device
    • Alternate run file
  2. Establish the FastExport support environment as indicated in the following table.
    Commands for Establishing FastExport Support Environment
    Command Description
    LOGTABLE Specify the restart log table that maintains checkpoint information for the FastExport job.
    DATEFORM Specify the form of the DATE data type specifications for the FastExport job.
    LOGON Establish a session with the database.
    RUN FILE Transfer processing control to an alternate run file
    ROUTE MESSAGES Specify an alternate destination for FastExport output messages.
    SYSTEM Submit an operating system command to the client system.
    Teradata SQL statements Submit a supported Teradata SQL statement to the database.
    At a minimum, this portion of the FastExport job must include:
    • A LOGTABLE command to specify the restart log table
    • A LOGON command to provide a logon string that is used to connect all Teradata SQL and FastExport sessions with the database
    State these commands in any order, but both commands must appear before any task commands in the FastExport job script.
  3. Specify the FastExport task as indicated in the following table.
    Commands for Specifying the FastExport Task
    Command Description
    BEGIN EXPORT Signify the beginning of an export task specification.
    LAYOUT Specify, in conjunction with immediately following FIELD and FILLER commands, the layout of the input data records on the client system. (The layout specification will be referenced in a subsequent IMPORT command.)
    FIELD Specify a field of the input record to be used to supply values for variables in the SELECT statement.
    FILLER Describe a field of the input data record that is not referenced, but used only to indicate the relative position of the following FIELD data.
    EXPORT Specify the destination file and format specifications for export data retrieved from the database.
    IMPORT Specify the client file that provides the USING values for the SELECT statement.
    SELECT Specify the row data to be exported from the database.
    END EXPORT Signify the end of the FastExport task and initiate the task processing.
    At a minimum, this portion of the FastExport job must include:
    • A BEGIN EXPORT command
    • A select request
    • An EXPORT command
    • An END EXPORT command
  4. To specify another FastExport task:
    • Use the support commands listed in Step 2 to modify the FastExport support environment for the next task.
    • Use the task commands listed in Step 3 to specify the next task.
    Repeat these steps for each task in the FastExport job.
  5. Use the LOGOFF command to disconnect all active sessions with the database and terminate FastExport on the client system.