Querying data in a cloud file through a materialized view and a Snowflake external table
Data in Snowflake is maintained in databases. You can query this data by using:
-
External tables, which reference data files located in a cloud storage. These tables stores file-level metadata (such as the filename, a version identifiers, and other properties) about a data file stored in an external stage, thus providing users a database table interface for querying the data in the file. For information about the Snowflake external table feature, see https://docs.snowflake.net/manuals/user-guide/tables-external-intro.html
- Materialized views, which store pre-computed data derived by a query. Since the data is pre-computed, querying a materialized view is faster than executing the original query. For information about the Snowflake materialized view feature, see https://docs.snowflake.net/manuals/user-guide/views-materialized.html.
-
You have a valid Amazon S3 user account.
- The data file (log1.json in this example) is in the logs folder under your S3 bucket named S3://my-bucket.
- You have a valid Snowflake user account.