17.10 - Example: NOSREAD_SCHEMA with CSV Schema - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Operators and User-Defined Functions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-08-13
dita:mapPath
fsi1592016213432.ditamap
dita:ditavalPath
fsi1592016213432.ditaval

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 NULL
       Name site_no
   DataType int
      Depth           1
  NullFound F
   FileType json
   Location /S3/s3.amazonaws.com/td-usgs-public/JSONDATA/09513780/2018/06/27.json

ColPosition NULL
       Name datetime
   DataType TIMESTAMP(0) FORMAT'Y4-MM-DDBHH:MI'
      Depth           1
  NullFound F
   FileType json
   Location /S3/s3.amazonaws.com/td-usgs-public/JSONDATA/09513780/2018/06/27.json

The output is displayed vertically for readability.