Teradata BTEQ – Part 2



BTEQ EXPORT:-

Record/DATA mode- This is set by .EXPORT DATA. In this mode data will be written to flat file in native format i.e. INTEGER data is written  as a 4 bytes binary field. It cannot be read and uderstood using a normal text editor.

BTEQ export data mode

Field/Report mode- This is set by .EXPORT REPORT. This is the default mode for BTEQ. The output of this BTEQ export includes column headers for the fields, white space and can be understand using a text editor.

BTEQ export report mode

Indicator mode- This is set by .EXPORT INDICDATA. This is same as DATA mode, but also include a bitmap to recognize NULL. This helps to recognize NULL values into another RDBMS.

BTEQ export Indic mode

DIF mode- Known as Data Interchange Format, which allows users to export data from Teradata tobe directly utilized for spreadsheet applications like Excel, FoxPro and Lotus.

BTEQ export dif mode

BTEQ IMPORT:-

BTEQ can also import the the data from the source and incorporate the data into SQL to modify the content of one or more tables. But before the we need to provide the name of the file and the format. These will be defined within the scripts file-

Format of the IMPORT command-

.IMPORT  <mode> {FILE | DNAME = <filename> [,SKIP=n]