turbot/snowflake
steampipe plugin install snowflake

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_on
from
snowflake_view;
select
name,
database_name,
schema_name,
is_materialized,
is_secure,
created_on
from
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_on
from
snowflake_view
where
is_materialized;
select
name,
database_name,
schema_name,
is_materialized,
is_secure,
created_on
from
snowflake_view
where
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_on
from
snowflake_view
where
is_secure;
select
name,
database_name,
schema_name,
is_materialized,
is_secure,
created_on
from
snowflake_view
where
is_secure = 1;

Schema for snowflake_view

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
accounttextThe Snowflake account ID.
commenttextOptional comment.
created_ontimestamp with time zoneThe timestamp at which the view was created.
database_nametextThe name of the database in which the view exists.
is_materializedbooleanTrue if the view is a materialized view; false otherwise.
is_securebooleanTrue if the view is a secure view; false otherwise.
nametextThe name of the view.
ownertextThe owner of the view.
regiontextThe Snowflake region in which the account is located.
schema_nametextThe name of the schema in which the view exists.
texttextThe 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