Introducing Agent Safe Governance for the AI Era

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

file

String

Yes

Absolute path to the output file on the BTEQ execution host. Must not contain newline characters.

query

String

Yes

SELECT statement to execute and export. Must start with SELECT and must not contain .EXPORT commands.

format

String

No

Export format. Accepted values: REPORT (human-readable) or DATA (binary). Default: REPORT.

width

Integer

No

Maximum line width for REPORT mode. Accepted range: 1 to 1048575. Default: 80.

separator

String

No

Field delimiter character for REPORT mode.

titleDashes

Boolean

No

Show dashes under column headers. true = ON, false = OFF.

nullValue

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.

loading

loading

loading

loading