Professional Documents
Culture Documents
BTEQs streamed package format design ensures fast processing and effective resource utilization.
We will also get some experience using BTEQ to import and export data to and from Teradata.
Export DATA
This is set by .EXPORT DATA.
Generally, users will export data to a flat file format. This is called Record Mode or DATA mode.
If the data has no headers or white space between the data contained in each column and the data is
written to the file in a normal format.
Export INDICDATA
This is set by .EXPORT INDICDATA.
This mode is used to export data with extra indicator bytes to indicate NULLs in column for a row.
Export REPORT
This is set by .EXPORT REPORT
In this mode the output of BTEQ export would return the column headers for the fields, white space,
expanded packed or binary data.
Its just looks like a report with column headers and data.
Export DIF
This called as Data Interchange Format, which allows users to export data from Teradata to be directly
utilized for spreadsheet applications like Excel, FoxPro and Lotus.
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.
Basic fundamentals of FastExport
FastExport EXPORTS data from Teradata.
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
BINARY
TEXT
UNFORMAT
Teradata Fastload does not support join indexes, foreign key references in target tables and tables with
secondary index defined.
It is necessary to drop any of the constraints listed before loading and recreate them afterwards.
The maximum number of concurrent Teradata Fastload tasks can be adjusted by a system administrator.
There are more reasons why FastLoad is so fast. Below are limitations of Fast load.
1) No Secondary Indexes are allowed on the Target Table: Usually UPI and NUPI are used in Teradata to
distribute the rows evenly across the AMPs. Secondary indexes are stored in a sub table block and
many times on a different AMP from the data row.
2)No Referential Integrity is allowed: The Referential Integrity defined on a table would take more system
checking to prevent referential constraints.
3)No Triggers are allowed at load time: Fast load focused on data load with high speed. So triggers not
allowed.
4)Duplicate Rows (in Multi-Set Tables) are not supported: Multiset tables are allowed duplicate data.
Fastload can load the data into multiset tables but duplicate rows are discarded.
5)No AMPs may go down (i.e., go offline) while FastLoad is processing: The down AMP must be repaired
before the load process can be restarted
6)No more than one data type conversion is allowed per column: Data type conversion cause high
resource utilization on the system
Log table
Log table stores the processing record information during load. This table contains one row for every
FastLoad running on the system
Empty Target table
As mentioned earlier target tables should be empty.
Error tables(two)
Each FastLoad requires two error tables. These are automatically created during run. These will populated
only errors occurred during the load.
The first error table is for any translation errors or constraint violations
For example, if a column is defined as integer but the data from source the data is coming in CHAR format.
i.e wrong data.
The second error table is for errors caused by duplicate values for Unique Primary Indexes.
Main use: Load, update and delete large tables in Teradata in a bulk mode
Efficient in loading very large tables
Multiple tables can be loaded at a time.
Updates data in a database in a block mode (one physical write can update multiple rows)
Uses table-level locks
Resource consumption: loading at the highest possible throughput
Duplicate rows allowed
Tpump=Stream
Fastload=Load
FastExport=Export
TPT is a utility tool of teradata and has all the capabilities of ETL along the
with features of other teradata load/unload utilities.
In simple terms TPT can be described as nutshell of all teradata standalone
utilities along with additional features.
The TPT script can be created in step so that incase of failure of job the job
process can be restarted from the step where it has failed.
Parallel Transporter can be invoked through 4 interfaces:
Application Program Interface (API) used by leading ETL vendors for tight,
parallel, high-performance integration
Script used when a customer doesnt have an ETL tool
Command line (sometimes referred to as the Easy Loader interface) used
to load data from a flat file with a single command line
Wizard used to generate simple scripts. Use this tool as a way to learn the
script language and not as a production load interface.