📜  Teradata FastExport(1)

📅  最后修改于: 2023-12-03 15:20:35.870000             🧑  作者: Mango

Teradata FastExport

Teradata FastExport is a high-speed utility that allows Teradata Database users to export large volumes of data from a source table into an external file. This external file can be used for data transfer between Teradata systems, loading data into other database vendors, or as a backup.

Key Features
  • FastExport uses multiple sessions to extract large amounts of data in parallel, increasing the data extraction speed.
  • FastExport can extract data from multiple tables in one operation, which makes it easier to manage complex data extraction and improve performance.
  • FastExport can apply SQL transformations to the extracted data, such as aggregations, arithmetic operations, and concatenation.
  • FastExport can write the extracted data to multiple file formats (e.g. CSV, TSV, JSON, etc.), giving users flexibility in how they store and use the extracted data.
How to Use Teradata FastExport

To use Teradata FastExport, you must first create a FastExport script that specifies the source table, target file format, and any SQL transformations to apply. Here's an example FastExport script:

.EXPORT FILE=/path/to/exported_data.csv
.Sessions 4
.LOGTABLE my_database.logtable;
.LOGON my_teradata_server/my_username,my_password;
BEGIN EXPORT;
SELECT 
    column1,
    column2,
    SUM(column3)
FROM my_database.source_table
GROUP BY 
    column1,
    column2;
.END EXPORT;
.LOGOFF;
.QUIT;

This script exports data from my_database.source_table to a CSV file located at /path/to/exported_data.csv. It aggregates column3 and groups the results by column1 and column2. The .Sessions command specifies that FastExport should use four parallel sessions to export the data.

To run the script, save it to a file (e.g. export_script.txt) and execute the following command from a command prompt or terminal:

fastexport < export_script.txt

This will initiate the FastExport process and export the data to the specified file.

Conclusion

Teradata FastExport is a powerful tool that provides fast, efficient data extraction capabilities for Teradata Database users. With its support for parallelism, SQL transformations, and multiple file formats, FastExport makes it easy to extract, transfer, and backup large volumes of data.