Step 4: Selects one record from the Emp table to check if the table has any records. The above Teradata BTEQ script performs the above task in the following steps. DIF mode: Allows users to export data from Teradata that is directly utilized for spreadsheet applications such as Excel, FoxPro, and Lotus.įollowing is an example of the Teradata BTEQ script.It helps to acknowledge NULL values into another RDBMS. Indicator mode: It is similar to DATA mode, but it also includes a bitmap to recognize NULL.The output of this BTEQ export includes column headers for the fields, white space, and can be understood using a text editor.
Field/Report mode: This is the default mode of BTEQ.It cannot be read and understood using a regular text editor. Record/DATA mode: In this mode, data will be written to a flat file in native format i.e., INTEGER data is written as a 4 bytes binary field.Data can be exported in a variety of formats such as: The data can be written to either mainframe or LAN attached computer using SELECT from Teradata. BTEQ is an excellent tool for importing and exporting data.īTEQ can import the data from the source and incorporate it into SQL to modify the content of one or more tables.Teradata SQL Assistant ( Queryman) outputs data in a spreadsheet format wherein using BTEQ users can get the output in the report format.Users also can submit BTEQ jobs from the batch scripts, have error checking and conditional logic, and allow for the work to be done in the background. Interactive users can send SQL and get an answer set on the screen. It can submit SQL in both modes, either in batch or interactive way.Teradata BTEQ has the following limitations, such as: EXPORT:It specifies the output file path and initiates the export.IMPORT:It specifies the input file path.LOGOFF:It logs off from the database and terminates all sessions.RUN FILE:It executes the query contained in a file.LABEL:It assigns a name to a set of SQL commands.DATABASE: It sets the default database.