What is the Teradata Fastexport?
Teradata FastExport uses multiple sessions to rapidly move significant data volumes between Teradata Vantage and client utilities.
The destination for the exported information could be any mainframe-attached or network-attached file.
When Teradata Vantage FastExport is executed, the SQL statements in the FastExport script are executed.
Teradata FastExport can export in different modes: RECORD or INDICATOR. By default, the INDICATOR mode is used. The distinction between both is that the INDICATOR mode will use indicator bits to mark NULL values. If we are working on mainframes, we can use the RECORD mode.
FastExport for Teradata Vantage can export data in below formats:
The Fastload format is especially interesting when FastExport is used to copy data from one Teradata system to another. To create plain files, the TEXT format is mainly used.
When to use The Fastexport for Vantage instead of BTEQ?
The most important reason for utilizing Teradata FastExport is that it exports using several sessions, optimizing parallelism. Additionally, BTEQ exports data row by row, but FastExport does it in whole data blocks; from a performance point of view, this is a huge disadvantage if we export a vast amount of data.
After Teradata FastExport is invoked, it spools the result set of the SQL query. Redistribution of rows might be needed to assemble the data blocks, which might decrease performance. Therefore, an option can be used, which is called NOSPOOL; unfortunately, it limits the usage to basic SQL statements (selecting from only one table) and does not allow us to sort the exported data.
Here is an example scripts:
.LOGTABLE dwhpro.customer_log; .LOGON localhost/tuning,***; DATABASE dwhpro; .BEGIN EXPORT SESSIONS 4; .EXPORT OUTFILE customers.txt MODE RECORD FORMAT TEXT; SELECT CAST(Lastname AS CHAR(10)), CAST(FirstName AS CHAR(15)) FROM Customer; .END EXPORT; .LOGOFF;
Using fast export on a Teradata Vantage system is no longer recommended as all utilities have been replaced by TPT (Teradata Parallel Transporter). TPT provides a common scripting language and offers many more options that are not available when using FastExport directly.