Example: NOSREAD_SCHEMA with CSV Schema - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

If not already done, create the authorization object. See Example: Create an Authorization Object.

Run the READ_NOS command:

SELECT * FROM (
LOCATION='/s3/td-usgs-public.s3.amazonaws.com/CSVDATA/'
AUTHORIZATION=MyAuthObj
RETURNTYPE='NOSREAD_SCHEMA'
) AS d;

Your result is similar to the following:

ColPosition           1
       Name GageHeight2
   Datatype decimal(3,2)
   FileType csv
   Location /S3/s3.amazonaws.com/td-usgs-public/CSVDATA/09513780/2018/06/27.csv
ColPosition           2
       Name Flow
   Datatype decimal(3,2)
   FileType csv
   Location /S3/s3.amazonaws.com/td-usgs-public/CSVDATA/09513780/2018/06/27.csv
ColPosition           3
       Name site_no
   Datatype int
   FileType csv
   Location /S3/s3.amazonaws.com/td-usgs-public/CSVDATA/09513780/2018/06/27.csv

The output is displayed vertically for readability.