Example: Create a Manifest File Using READ_NOS - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

If a WRITE_NOS operation fails before being able to create a manifest file you can use READ_NOS with RETURNTYPE('NOSREAD_KEYS') to read the keys of the existing objects in external object storage. This is used as input to create a new manifest file. The new manifest file created this way reflects all data objects currently in the external object storage location, and can aid in determining which data objects resulted from an incomplete WRITE_NOS operation.

  1. Create a manifest file using READ_NOS as input:
    SELECT * FROM WRITE_NOS
    ( ON 
       (SELECT Location, ObjectLength FROM (
           LOCATION='YOUR-OBJECT-STORE-URI/20180627/'
           AUTHORIZATION=MyAuthObj
           RETURNTYPE='NOSREAD_KEYS'
         ) as d1 )
      USING 
        AUTHORIZATION(MyAuthObj)
        MANIFESTFILE('YOUR-OBJECT-STORE-URI/20180627/ManifestFile3/manifest3.json')
        MANIFESTONLY('TRUE')
        OVERWRITE('TRUE')
    ) AS d;

    Replace the LOCATION of YOUR-OBJECT-STORE-URI/20180701/ with the URI to the external object storage location where you want to write the manifest file.

    Replace the MANIFESTFILE location of YOUR-OBJECT-STORE-URI/20180701/ManifestFile3/manifest3.json with the URI to the manifest file on external object storage.

    Your result is similar to the following:

    ObjectName                                                              ObjectSize
    ------------------------------------------------------------------------- ----------
    /S3/s3.amazonaws.com/iewritenostest/20180627/ManifestFile3/manifest3.json        996