Example: Using READ_NOS to Query a File in Google Cloud Storage - 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™

This SELECT statement uses READ_NOS to query a file in Google Cloud Storage. Instead of using an authorization object, the authorization credentials are including in the AUTHORIZATION keyword.

SELECT payload FROM (
LOCATION='/gs/storage.googleapis.com/td-usgs/JSONDATA/'
AUTHORIZATION='{"ACCESS_ID":"","ACCESS_KEY":""}'
) AS dt;

Depending on the user credentials, Analytics Database uses either the S3-compatible connector or the native Google connector.

Your result will be similar to the following:

{ "site_no":"09380000", "datetime":"2018-06-27 00:00", "Flow":"16200", "GageHeight":"9.97", "Temp":"11.0", "Conductance":"669", "Precipitation":"0.00"}
{ "site_no":"09380000", "datetime":"2018-06-28 00:00", "Flow":"15900", "GageHeight":"9.91", "Temp":"11.0", "Conductance":"671", "Precipitation":"0.00"}
[...]