Example: Create a Manifest File Using READ_NOS - Analytics Database - Teradata Vantage

Teradata Vantage™ - Native Object Store Getting Started Guide - 17.20

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-05
dita:mapPath
tsq1628112323282.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
jjn1567647976698
Product Category
Teradata Vantage

If a WRITE_NOS operation fails before it can create a manifest file you can use READ_NOS with RETURNTYPE('NOSREAD_KEYS') to read the keys of the existing objects in the external 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 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 store 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 store.

    Your result will be similar to the following:

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