Teradata Fastexport is a command driven utility that uses multiple sessions to transfer data from tables or views to client system.
Why it is called “FAST”export?
We have Teradata BTEQ in place for exporting the data then why should one use FastExport? The main reason for using FastExport is that it takes full advantage of multiple session which influence Teradata parallelism.
Also, BTEQ exports data row by row but FastExport does it in 64K blocks. Thus the export is lightning fast.
When a FastExport is invoked following steps are involved:
- Log on to Teradata for specified no of sessions using the username/password provided.
- Retrieve the data from database by executing the query provided.
- Export data to the specified file.
- Log off from database.
FastExport only supports SELECT statement. It can support multiple SELECT statements in one run. this should only be used if you want to export more than half million records.
There are no error files as in case of FastLoad or MultiLoad.
It can support conditional logic, arithmetic calculations, logical expressions and data conversion.
Only 15 Utilities?
Teradata RDBMS only supports maximum of 15 FastLoad, MultiLoad or FastExport utility jobs. This value can be reset from 0-15. The reason why Teradata allows only 15 session is that these all utilities use large blocks to transfer the data. If more than 15 jobs are supported then there might be a possibility of reaching saturation point for the resources available. Thus to protect system from this saturation Teradata allows only 15 jobs at a time keeping rest it the queue state.
Modes of FastExport:-
FastExport works on two modes: RECORD and INDICATOR. By default INDICATOR mode is used. The difference between the two is that INDICATOR mode will set the indicator bits to 1 for the NULL values. If you are working on mainframes then use RECORD mode.
COMPARISON BETWEEN BTEQ AND FASTEXPORT:-
BTEQ |
FASTEXPORT |
Once the BTEQ is invoked it immediately starts sending the rows to the file. |
Once the FastExport is invoked it puts the rows into spool and then starts building the data blocks. |
If the output data is sorted, Bteq will still continue to send the data row by row, no redistribution is required. |
Redistribution of data is required to build the blocks into correct sequence which thus takes a little longer time. |
If BTEQ terminates abruptly, all the rows are discarded from the spool. You will have to rerun the BTEQ from scratch. |
If FastExport terminates abruptly, all the rows are in worktables and it can continue sending them where it left off. |