The example shows filtering based on the Parquet data received from the object store. All the Parquet data from the object store at the foreign table location will be brought into the database and then filtered.
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 to access external Parquet data:
CREATE FOREIGN TABLE riverflow_parquet_path , EXTERNAL SECURITY authorization_object USING ( LOCATION ('YOUR-OBJECT-STORE-URI') PATHPATTERN ('$data/$siteno/$year/$month/$day') );
See Variable Substitutions for Examples for the credentials and location values for the sample river flow data set.
- Filter on a specific column in the Parquet data from external storage using the foreign table.
SELECT TOP 2 GageHeight, Flow FROM riverflow_parquet_path WHERE site_no = '09394500';
TheGageHeight TheFlow ------------- --------- 6.40 6.29 5.13 0.00