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