Path Filtering Using a Key in the Path | NOS | Teradata Vantage - 17.10 - Path Filtering Using a Key in the Path of the Data Set - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Native Object Store Getting Started Guide

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1214-171K
Language
English (United States)

Key (or path) filtering reduces the number of external objects that are transferred to provide the result. This reduces the I/O performed on the external object store time and results in less work for the SQL Engine.

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 a foreign table or ask your database administrator to create the foreign table specifying a LOCATION that filters on site_no. Use the authorization object created in Controlling Foreign Table Access with an AUTHORIZATION Object:
    SELECT TOP 2 GageHeight, Flow
    FROM riverflow_csv_pathfilter
    WHERE $path.$siteno = site_no;

    Where site_no is a site number value; for example, 09380000.

    Your result will be similar to the following

    GageHeight    Flow
    ----------  ------
         10.16   17200
         10.25   17700