17.10 - Example: Using MANIFESTFILE('file_name'), MANIFESTONLY('TRUE'), and OVERWRITE('TRUE') to Overwrite the Manifest File - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Native Object Store Getting Started Guide

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

The following overwrites a manifest file on external object store.

Create a database table containing manifest file values, then write the rows in the table to the manifest file on external object store. Because the manifest file already exists on external object store, it is overwritten, not appended to.

  1. If not already done, create a manifest table called ManifestTbl in the database to store the manifest values. See Creating a Manifest File Without Writing Separate Objects to the Object Storage.
  2. Overwrite the manifest file with data from the table called ManifestTbl:
    SELECT *
      ON  ( SELECT * FROM ManifestTbl )
    ) AS d ;

    Replace the LOCATION of YOUR-OBJECT-STORE-URI/20180701/ManifestFile2/ 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/ManifestFile2/manifest2.json with the URI to the manifest file on external object store.

    MANIFESTONLY('TRUE') writes only a manifest file to external storage; no data objects are written:
    • Use this option to create a new manifest file in the event that a WRITE_NOS operation fails due to a database abort or restart, or when network connectivity issues interrupt and stop a WRITE_NOS operation before all data has been written to external storage.
    • The manifest is created from the table or query result set that is input to WRITE_NOS. The input must be a list of storage object names and sizes, with one row per object.

    OVERWRITE('TRUE') overwrites an existing manifest file. Note, OVERWRITE('TRUE') must be used with MANIFESTONLY('TRUE').

    Your result will be similar to the following:

    ObjectName                                                       ObjectSize
    ------------------------------------------------------------------------- ----------
    /S3/s3.amazonaws.com/iewritenostest/20180627/ManifestFile2/manifest2.json        433
  3. You can view the manifest file on external storage using commands from the command line of your external object store. The manifest file contains information similar to the following: