Using NOSREAD_KEYS to List the Files in the Specified LOCATION - 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

NOSREAD_KEYS retrieves a list of files from the path specified by LOCATION.

SELECT TOP 2 location(CHAR(200)), ObjectLength FROM (
LOCATION='YOUR-OBJECT-STORE-URI'
AUTHORIZATION=authorization_object
RETURNTYPE='NOSREAD_KEYS'
) AS d;

ObjectLength is the size of the external files in the specified LOCATION of the object store.

Example: Using NOSREAD_KEYS to List the Files in the Specified LOCATION

SELECT TOP 2 location(CHAR(200)), ObjectLength FROM (
LOCATION='/s3/td-usgs-public.s3.amazonaws.com/CSVDATA/'
AUTHORIZATION=MyAuthObj
RETURNTYPE='NOSREAD_KEYS'
) AS d;

The example accesses the Teradata-supplied public bucket.

Your result will be similar to the following:

Location  /S3/s3.amazonaws.com/td-usgs-public/CSVDATA/09380000/2018/06/30.csv
ObjectLength  5009

Location  /S3/s3.amazonaws.com/td-usgs-public/CSVDATA/09380000/2018/06/29.csv
ObjectLength  5088