Path Filtering Using a Key in the Path | NOS | VantageCloud Lake - Path Filtering Using a Key in the Path of the Data Set - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

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 storage time and results in less work for the Analytics 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 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 Example: Controlling Access with an Authorization Object Using User and Password Credentials:
    SELECT TOP 2 columnX, columnY
    FROM table_name
    WHERE $path.columnN = value;

Example: Path Filtering Using a Key in the Path of the Data Set

If not already done, create the foreign table. See Filtering Using a Path Filter in the CREATE FOREIGN TABLE Definition.

SELECT TOP 2 GageHeight, Flow
FROM riverflow_pathfilter
WHERE $path.$site_no = 09396100;

Your result is similar to the following:

GageHeight  Flow
----------  -----
1.06        6.82
0.49        0