Set Up to Run Parquet Examples | Native Object Store ( NOS ) | Teradata Vantage - 17.05 - Setting Up to Run Parquet Examples - Teradata Database

Teradata Vantageā„¢ - Native Object Store Getting Started Guide

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.05
created_date
January 2021
category
Programming Reference
featnum
B035-1214-175K

To use NOS, create a NOS table definition inside Advanced SQL Engine, point it at any external object store you are authorized to access, and then you can explore the data using all the analytics ability of Teradata Vantage. The NOS table definition is called a foreign table, and can contain complex data types. A foreign table makes the external data available in a structured relational format, allowing it to be aggregated or joined to other relational tables inside the database.

Data read through a foreign server is not automatically stored in the database and the data can only be seen by that query. Data can be loaded into the database using the techniques shown in Loading External Parquet Data 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 the foreign table or ask your database administrator to create the foreign table:
    CREATE FOREIGN TABLE riverflow_parquet
    , EXTERNAL SECURITY DEFINER TRUSTED DefAuth
    (
      Location VARCHAR(2048) CHARACTER SET UNICODE CASESPECIFIC
      , GageHeight2 DOUBLE PRECISION FORMAT '-ZZZ9.99'
      , Flow DOUBLE PRECISION FORMAT '-ZZZZ9.99'
      , site_no BIGINT
      , datetime VARCHAR(16) CHARACTER SET UNICODE CASESPECIFIC
      , Precipitation DOUBLE PRECISION FORMAT '-ZZZ9.99'
      , GageHeight DOUBLE PRECISION FORMAT '-ZZZ9.99'
    )
    USING (
        LOCATION ('YOUR-STORAGE-ACCOUNT')
        STOREDAS ('PARQUET')
    ) NO PRIMARY INDEX
    , PARTITION BY COLUMN ;

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