- [ database_name.]table_name
- Name of the table from which data is to be written to external storage.
- subquery
- Query that returns data to be written to external storage.
- PARTITION BY column_name [ ,...] ORDER BY column_name [ ,...]
- HASH BY column_name [ ,...] LOCAL ORDER BY column_name [ ,...]
- LOCAL ORDER BY column_name [ ,...]
- These clauses control how Vantage sorts and divides the rows of table_name or the rows returned by subquery among the AMPs before writing them to external storage.
- LOCATION
- A URI identifying the external storage system in the format
/connector/endpoint/bucket_or_container/prefix
- AUTHORIZATION
- [Optional] Authorization for accessing external storage.
- STOREDAS
- Determines the format in which WRITE_NOS creates objects in external storage. For information about external storage formats, see Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.
- NAMING
- Determines how the objects containing the rows of data are named in the external storage:
- DISCRETE
Uses the ORDER BY columns as part of the object names in external storage.
For example, for ORDER BY dateColumn, intColumn, the object names look similar to this:S3/ceph-s3.teradata.com/xz186000/2019-03-01/13/object_33_0_1.parquet
2019-03-01 is the value for dateColumn, the first ordering column, and 13 is the value for the second ordering column, intColumn. Every row stored in this external Parquet-formatted object contains those two values.
- RANGE
Includes as part of the object name the range of values included in the partition for each ordering column.
For example, for the preceding ORDER BY phrase, the object names look similar to this:S3/ceph-s3.teradata.com/xz186000/2019-01-01/2019-03-02/9/10000/object_33_0_1.parquet
In this external Parquet-formatted object:- 2019-01-01 and 2019-03-02 are the minimum and maximum values for the first ordering column, dateColumn.
- 9 and 10000 are the minimum and maximum values for the second ordering column, intColumn.
- DISCRETE
- ROWFORMAT
- [Optional for CSV data, disallowed otherwise.] NOS generates the ROWFORMAT clause.
- record_delimiter
- Specify that the record delimiter is the line feed character, "\n". The key name and "\n" are case-sensitive.
- field_delimiter
- Specify the field delimiter. The key name and fd_value are case-sensitive.
- MANIFESTFILE
- Specifies the fully qualified path and file name where the manifest file is written. Use the format
/connector/end point/bucket_or_container/prefix/manifest_file_name
- MANIFESTONLY
- Writes only a manifest file in external storage.
- OVERWRITE
- Determines whether an existing manifest file in external storage is to be overwritten with a new manifest file that has the same name. If FALSE, the default, WRITE_NOS returns an error if a manifest file exists in external storage that is named identically to the value of MANIFESTFILE. OVERWRITE must be used with MANIFESTONLY('TRUE').
- INCLUDE_ORDERING
- INCLUDE_HASHBY
- Determines whether the the ORDER BY and HASH BY columns and their values are written to external storage.
- MAXOBJECTSIZE
- Specifies maximum output object size in megabytes, where max_object_size is a number between 4 and 16.
- COMPRESSION
- Determines the compression algorithm used to compress the objects written to external storage.For Parquet files the compression occurs inside parts of the parquet file instead of for the entire file, so the file extension on external objects remains .parquet.