Social Icons

FAST EXPORT

TeradataWiki- Teradata Utilities Fast export
FastExport ,the name itself is spells to exports data from Teradata to a Flat file. But BTEQ also does the same thing.The main difference is BTEQ exports data in rows and FastExport exports data in 64K blocks. So if its required to load data with lightning speed Fast export is the best choice.

FastExport is a 64K block utility it falls under the limit of 15 block utilities. That means that a system can’t have more than a combination of 15 FastLoads, MultiLoads, and FastExports.

Basic fundamentals of FastExport
  1. FastExport EXPORTS data from Teradata.
  2. FastExport only supports the SELECT statement.
  3. Choose FastExport over BTEQ when Exporting Data of more than half a million+ rows
  4. FastExport supports multiple SELECT statements and multiple tables in a single run
  5. FastExport supports conditional logic, conditional expressions, arithmetic calculations, and data
  6. conversions.
  7. FastExport does NOT support error files or error limits.
  8. FastExport supports user-written routines INMODs and OUTMODs

Sample fast export Script

.LOGTABLE Empdb.Emp_Table_log;
.LOGON TD/USERNAME,PWD;

BEGIN EXPORT
SESSIONS 12;

.EXPORT OUTFILE C:\TEMP\EMPDATA.txt
 FORMAT BINARY;

SELECT EMP_NUM    (CHAR(10))
      ,EMP_NAME   (CHAR(50))
      ,SALARY     (CHAR(10))
      ,EMP_PHONE  (CHAR(10))
FROM Empdb.Emp_Table;
      )

.END EXPORT;
.LOGOFF;

FastExport Modes
FastExport has two modes: RECORD or INDICATOR
RECORD mode is the default, but you can use INDICATOR mode if required.
The difference between the two modes is INDICATOR mode will set the indicator bits to 1 for column values containing NULLS.

FastExport Formats
FastExport can export data in below formats
  • FASTLOAD
  • BINARY
  • TEXT
  • UNFORMAT

5 comments:

  1. Being an EXPORT script .EXPORT OUTFILE should be mentioned instead of .IMPORT

    ReplyDelete
  2. Once you have done the export, how do you import that same data? What tool do you use to do the import?

    Regards,
    Girish

    ReplyDelete
    Replies
    1. It Can be any think like BTEQ,MLOAD, FLOAD or TPT

      Delete
    2. You can use " mlscript ; " command in the fast export job. It will automatically create MLOAD job to import the file that is exported by the fast load job

      Delete
  3. It should be .Export instead of .Import

    ReplyDelete