Combine Path and Column Filters for Parquet | NOS | Teradata Vantage - 17.05 - Combining Path and Column Filtering - 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

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_path. See: Filtering External Parquet Data From a Foreign Table.
  3. Combine path and column filtering (GageHeight > 5) to find how many times the gauge height was greater than 5 in July 2018 at river site 09394500:
    SELECT COUNT(*)
    FROM riverflow_parquet_path
    WHERE GageHeight > 5
    AND $path.$siteno = 09394500
    AND $path.$year = '2018'
    AND $path.$month = '07';

    Result:

    Count(*)
    --------
         834