Sample External Parquet Data with a Foreign Table | NOS | Teradata Vantage - 17.05 - Sampling External Data In Place Using a Foreign Table - 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

Preview random rows of Parquet data in place from external object store using a foreign table:

The examples use a sample river flow data set. To use your own data, replace the table and column names, and authorization object. See Variable Substitutions for Examples for the credentials and location values for the sample data set.

  1. To run NOS-related commands, log on to the database as a user with the required privileges.
  2. If it does not exist, create the foreign table or ask your database administrator to create the foreign table called riverflow_parquet. See Setting Up to Run Parquet Examples.
  3. To see sample records with the column names included before each string of values, issue the following command against the foreign table called riverflow_parquet:
    SELECT TOP 2 * FROM riverflow_parquet;

    Your result will be similar to this, reflecting your external object store location:

         Location /S3/td-usgs.s3.amazonaws.com/PARQUETDATA/09394500/2018/07/01.parquet
      GageHeight2     4.81
             Flow      0.00
          site_no              9394500
         datetime 2018-07-01 00:15
    Precipitation     0.00
       GageHeight     4.75
         Location /S3/td-usgs.s3.amazonaws.com/PARQUETDATA/09394500/2018/07/01.parquet
      GageHeight2     4.82
             Flow      0.01
          site_no              9394500
         datetime 2018-07-01 00:00
    Precipitation     0.00
       GageHeight     4.75
    For readability, the output is displayed vertically.