bteqExport
Last updated: June 9, 2026
Writes query results to a file on the BTEQ execution host. Generates the complete sequence of BTEQ dot-commands (.SET WIDTH, .SET SEPARATOR, .EXPORT, the SELECT query, and .EXPORT RESET) so you do not need to hand-write these commands in a <sql> block.
This is useful for data validation, ETL staging, and audit extracts. The change type guarantees that .EXPORT RESET is always emitted after the query, preventing accidental corruption of subsequent output.
Note: This change type does not support automatic rollback.
Available attributes
Attribute | Type | Required | Description |
| String | Yes | Absolute path to the output file on the BTEQ execution host. Must not contain newline characters. |
| String | Yes | SELECT statement to execute and export. Must start with |
| String | No | Export format. Accepted values: |
| Integer | No | Maximum line width for REPORT mode. Accepted range: 1 to 1048575. Default: |
| String | No | Field delimiter character for REPORT mode. |
| Boolean | No | Show dashes under column headers. |
| String | No | Display string for NULL values. |
Example code
Be sure to replace your_table, your_author, and the file paths with your actual values.