Load Data Using READ_NOS | Native Object Store ( NOS ) | Teradata Vantage - Loading External Data into the Database Using READ_NOS and CREATE TABLE AS - Analytics Database - Teradata Vantage

Teradata Vantage™ - Native Object Store Getting Started Guide - 17.20

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
tsq1628112323282.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
jjn1567647976698
Product Category
Teradata Vantage
READ_NOS combined with a CREATE TABLE AS clause accesses data from the object store and creates a permanent table for the data inside the database, without needing to create a foreign table first.
READ_NOS does not need to be specified in the command. The SELECT statement invokes it.

In this example, all the data in the object store identified by the LOCATION is loaded into the database.

The examples and results show a sample river flow data set. To use your own data, replace the table and column names, and authorization object.

  1. To run NOS-related commands, log on to the database as a user with the required privileges.
  2. Create and load the table:
    CREATE MULTISET TABLE multiset_table_name AS (
    SELECT columnX, columnY, ...columnN
    FROM (
    LOCATION='YOUR-OBJECT-STORE-URI'
    AUTHORIZATION=authorization_object
    ) AS d
    ) WITH DATA;

    See Variable Substitutions for Examples for the credentials and location values for the sample river flow data set.

Example: Loading External Data into the Database Using READ_NOS and CREATE TABLE AS

Create and load the table:

CREATE MULTISET TABLE riverflowperm AS (
SELECT site_no, Flow, GageHeight, Precipitation, datetime, GageHeight2
FROM (
LOCATION='/s3/td-usgs-public.s3.amazonaws.com/CSVDATA/'
AUTHORIZATION=MyAuthObj
) AS d
) WITH DATA;

Show the number of rows in the table:

SELECT COUNT (*) FROM riverflowperm;

Your result will be similar to the following:

   Count(*)
-----------
      17058