📜  Teradata-FastExport(1)

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

Teradata FastExport

Teradata FastExport Logo

Teradata FastExport is a command-line utility provided by Teradata Corporation for exporting large volumes of data from a Teradata database to external files. It offers a high-performance parallel data export mechanism designed specifically for Teradata Database.

Key Features
  • High-Speed Export: Teradata FastExport employs parallel processing to export data quickly. It maximizes the use of system resources, such as multiple network sessions and multiple AMPs (Access Module Processors), to achieve high-speed data export.

  • Efficient Data Transformation: FastExport allows you to perform various data transformations during the export process. You can extract only required columns, apply filters, convert data types, aggregate data, and perform other required transformations.

  • Flexible Output Formats: FastExport supports exporting data to various file formats, including flat files (CSV, TSV), fixed-width files, binary files, and XML files. You can define the format specifications, delimiters, record separators, and layout options to meet your specific requirements.

  • Error Reporting: FastExport provides detailed error reporting and error handling capabilities. It logs any errors encountered during the export process, allowing you to identify and rectify issues efficiently.

  • Scripting Support: FastExport scripts can be written using Teradata SQL statements and specific FastExport commands. This scripting approach allows you to automate the export process and easily repeat it for future exports.

How FastExport Works

FastExport follows a three-step process to export data from a Teradata database:

  1. Logon: Establish a connection with Teradata Database using your login credentials.

  2. DML Processing: Send the Data Manipulation Language (DML) requests to the database to extract data based on the specified criteria. You can apply filters, transformations, aggregations, etc., to get the desired result set.

  3. Data Export: The selected data is then exported to the external files in the specified format. FastExport utilizes multiple sessions and AMPs to parallelize the export process for maximum performance.

Sample FastExport Script

The following example demonstrates a sample FastExport script written in Teradata SQL:

.EXPORT FILE=/path/to/output.csv

.LOGON username/password;

.SET RECORDMODE OFF;
.SET LAYOUT SQL_DATA;

SELECT * FROM database.table
WHERE condition;

.LOGOFF;
.EXIT;

In this script, the .EXPORT command specifies the output file path and format. The .LOGON command establishes a connection with the Teradata Database, followed by necessary set commands to configure the export process. Finally, the SQL query is executed, and the results are exported to the specified file.

Conclusion

Teradata FastExport offers a powerful and efficient solution for exporting large volumes of data from a Teradata Database to external files. With its high-speed parallel data export mechanism and flexible data transformation capabilities, it enables programmers to export data effectively and meet various export requirements.