Using WRITE_NOS with AUTHORIZATION | NOS | VantageCloud Lake - Example: Using WRITE_NOS with AUTHORIZATION - Teradata VantageCloud Lake

Lake - Manage and Move Data

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-05-16
dita:mapPath
atx1683670417382.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
atx1683670417382

The example uses the AUTHORIZATION keyword with an authorization object to provide credentials to external object storage.

    Prerequisites

  1. Set up or obtain access to the external object storage where you want to write data. Follow the instructions from your external object storage vendor.
  2. If not already done, have an administrative user create the authorization object that has the credential to the bucket. See Example: Controlling Access with an Authorization Object Using User and Password Credentials.
  3. Use AUTHORIZATION Keyword

  4. Use WRITE_NOS with the AUTHORIZATION keyword:
    SELECT * FROM WRITE_NOS (
    ON ( SELECT * FROM RiverFlowPerm WHERE DateTime = '2018-06-27 00:00:00' ) USING
    LOCATION('/S3/s3.amazonaws.com/iewritenostest/RiverFlowPerm2/')
    AUTHORIZATION(MyAuthObj)
    STOREDAS('PARQUET')
    ) AS d;

    Replace LOCATION with the URI to the external object storage where you are writing the data.

    Your result is similar to the following:

    NodeId AmpId Sequence ObjectName
    ------ ----- -------- ------------------------------------------------------------------------
        33     0        1 /S3/s3.amazonaws.com/ie-writenos-bucket/20180701_auth_example/object_33_0_1.parquet
        33     1        1 /S3/s3.amazonaws.com/ie-writenos-bucket/20180701_auth_example/object_33_1_1.parquet
        33     2        1 /S3/s3.amazonaws.com/ie-writenos-bucket/20180701_auth_example/object_33_2_1.parquet