CSV File | READ_NOS Query | Teradata Vantage - Example: Using READ_NOS to Query an External CSV File - 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-12-13
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
Product Category
Teradata Vantageā„¢

This example uses the READ_NOS table operator to query an external CSV file. This query uses READ_NOS to select specific columns. The LOCATION parameter specifies a CSV file stored on Amazon S3.

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

Run the READ_NOS:

SELECT Flow, Precipitation, datetime, site_no, GageHeight
FROM (
LOCATION='/S3/td-usgs-public.s3.amazonaws.com/CSVDATA/'
AUTHORIZATION=MyAuthObj
) AS derived_table
WHERE GageHeight > 3.64
ORDER BY datetime;

Results:

Flow  Precipitation          datetime      site_no  GageHeight
-----  -------------  ----------------  -----------  ----------
  .00            .00  2018-06-27 00:00      9400568        6.51
  .01            .00  2018-06-27 00:00      9394500        4.75
  .00            .00  2018-06-27 00:15      9400568        6.51
  .01            .00  2018-06-27 00:15      9394500        4.75
  .00            .00  2018-06-27 00:30      9400568        6.51
[...]