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.
- To run NOS-related commands, log on to the database as a user with the required privileges.
- 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 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 will be similar to the following:
GageHeight Flow ---------- ----- 1.06 6.82 0.49 0