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

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 external object storage.

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 is 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