Example: NOSREAD_SCHEMA with CSV Schema - Analytics Database - Teradata Vantage

SQL Data Manipulation Language

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
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
Product Category
Teradata Vantage™

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 will be 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.