Export data from Teradata to object storage

Teradata Developer Guides

ft:locale
en-US
ft:lastEdition
2026-08-18

So far, we have talked about reading and importing data from object storage. Wouldn't it be nice if we had a way to use SQL to export data from Teradata to object storage? This is exactly what WRITE_NOS function is for. Let's say we want to export data from riverflow_native table to object storage. You can do so with the following query:

SELECT * FROM WRITE_NOS (
  ON ( SELECT * FROM riverflow_native )
  PARTITION BY site_no ORDER BY site_no
  USING
    LOCATION('/s3/your-bucket.s3.amazonaws.com/output-path/')
    AUTHORIZATION(aws_authorization)
    STOREDAS('PARQUET')
    COMPRESSION('SNAPPY')
    NAMING('RANGE')
    INCLUDE_ORDERING('TRUE')
) AS d;

The LOCATION value uses Teradata's NOS URI scheme: /s3/ for AWS S3, /gcs/ for Google Cloud Storage, and /az/ for Azure Blob Storage, followed by the bucket hostname and path. Replace your-bucket.s3.amazonaws.com/output-path/ with your actual bucket and destination prefix.

Here, we instruct Teradata to take data from riverflow_native and save it in the specified bucket using parquet format. The data will be split into files by site_no attribute. The files will be compressed.