Table: snowflake_view - Query Snowflake Views using SQL
Snowflake is a cloud-based data warehousing platform that provides a comprehensive solution for data storage, processing, and analytics. It offers a unique architecture that separates storage and compute resources, allowing each to scale independently. One of the key features of Snowflake is its support for views, which are virtual tables based on the result-set of an SQL statement.
Table Usage Guide
The snowflake_view
table provides insights into views within Snowflake. As a data engineer, explore view-specific details through this table, including the view's definition, database, schema, and more. Utilize it to uncover information about views, such as their structure, the SQL statement used to create them, and other related metadata.
Examples
Basic info
Analyze the settings to understand the security status, creation date, and whether the views are materialized in your Snowflake database. This information can be useful for database management, particularly in maintaining security and optimizing performance.
select name, database_name, schema_name, is_materialized, is_secure, created_onfrom snowflake_view;
select name, database_name, schema_name, is_materialized, is_secure, created_onfrom snowflake_view;
List materialized views
Uncover the details of all materialized views within a Snowflake database, including their names, security status, and creation dates. This is useful for understanding the structure of your data and ensuring it is appropriately secured.
select name, database_name, schema_name, is_materialized, is_secure, created_onfrom snowflake_viewwhere is_materialized;
select name, database_name, schema_name, is_materialized, is_secure, created_onfrom snowflake_viewwhere is_materialized;
List secure views
Discover the segments that have secure views in your Snowflake database. This can help enhance security by identifying views that are configured to restrict data access.
select name, database_name, schema_name, is_materialized, is_secure, created_onfrom snowflake_viewwhere is_secure;
select name, database_name, schema_name, is_materialized, is_secure, created_onfrom snowflake_viewwhere is_secure = 1;
Schema for snowflake_view
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account | text | =, !=, ~~, ~~*, !~~, !~~* | The Snowflake account ID. |
comment | text | Optional comment. | |
created_on | timestamp with time zone | The timestamp at which the view was created. | |
database_name | text | The name of the database in which the view exists. | |
is_materialized | boolean | True if the view is a materialized view; false otherwise. | |
is_secure | boolean | True if the view is a secure view; false otherwise. | |
name | text | The name of the view. | |
owner | text | The owner of the view. | |
region | text | The Snowflake region in which the account is located. | |
schema_name | text | The name of the schema in which the view exists. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
text | text | The text of the command that created the view, e.g., CREATE VIEW. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- snowflake
You can pass the configuration to the command with the --config
argument:
steampipe_export_snowflake --config '<your_config>' snowflake_view