SHOW SEMANTIC VIEWS

Lists the semantic views for which you have access privileges. You can list views for the current or specified schema.

The output returns view metadata and properties, ordered lexicographically by database, schema, and semantic view name. This is important to note if you want to filter the results using the provided filters.

See also:

CREATE SEMANTIC VIEW , DESCRIBE SEMANTIC VIEW , DROP SEMANTIC VIEW

Syntax

SHOW SEMANTIC VIEWS [ LIKE '<pattern>' ]
  [
    IN
      {
        SCHEMA |
        SCHEMA <schema_name>
      }
  ]
Copy

Parameters

LIKE 'pattern'

Optionally filters the command output by object name. The filter uses case-insensitive pattern matching, with support for SQL wildcard characters (% and _).

For example, the following patterns return the same results:

... LIKE '%testing%' ...
... LIKE '%TESTING%' ...

. Default: No value (no filtering is applied to the output).

[ IN ... ]

Optionally specifies the scope of the command. Specify one of the following:

SCHEMA . SCHEMA schema_name

Returns records for the current schema in use or a specified schema (schema_name).

If no database is in use, specifying SCHEMA has no effect on the output.

Output

The command output provides semantic view properties and metadata in the following columns:

Column

Description

created_on

Date and time when the semantic view was created.

name

Name of the semantic view.

database_name

Database in which the semantic view is stored.

schema_name

Schema in which the semantic view is stored.

comment

Comment about the semantic view.

owner

Role that owns the semantic view.

owner_role_type

The type of role that owns the object, for example ROLE. . If a Snowflake Native App owns the object, the value is APPLICATION. . Snowflake returns NULL if you delete the object because a deleted object does not have an owner role.

Access control requirements

A role used to execute this SQL command must have at least one of the following privileges at a minimum:

Privilege

Object

Notes

REFERENCES

Semantic view

OWNERSHIP

Semantic view

OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object, but can also be transferred using the GRANT OWNERSHIP command to a different role by the owning role (or any role with the MANAGE GRANTS privilege).

The USAGE privilege on the parent database and schema are required to perform operations on any object in a schema.

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Usage notes

  • The command returns a maximum of ten thousand records for the specified object type, as dictated by the access privileges for the role used to execute the command. Any records above the ten thousand records limit aren’t returned, even with a filter applied.

    To view results for which more than ten thousand records exist, query the corresponding view (if one exists) in the Snowflake Information Schema.

Examples

The following example lists the semantic views in the database that is currently in use:

SHOW SEMANTIC VIEWS;
Copy
+-------------------------------+-----------------------+---------------+-------------+---------+---------+-----------------+
| created_on                    | name                  | database_name | schema_name | comment | owner   | owner_role_type |
|-------------------------------+-----------------------+---------------+-------------+---------+---------+-----------------+
| 2025-02-28 16:16:04.002 -0800 | O_TPCH_SEMANTIC_VIEW  | MY_DB         | MY_SCHEMA   | NULL    | MY_ROLE | ROLE            |
| 2025-03-20 09:11:56.006 -0700 | TPCH_REV_ANALYSIS     | MY_DB         | MY_SCHEMA   | NULL    | MY_ROLE | ROLE            |
+-------------------------------+-----------------------+---------------+-------------+---------+---------+-----------------+
Language: English