CSV File | READ_NOS Query | VantageCloud Lake - Example: Using READ_NOS to Query an External CSV File - 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

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
[...]