- Schemas:
SEMANTIC_VIEWS view¶
This ACCOUNT_USAGE view displays a row for each semantic view in the account.
- See also:
Columns¶
Column name |
Data type |
Description |
---|---|---|
|
NUMBER |
Internal, Snowflake-generated identifier for the semantic view. |
|
VARCHAR |
Name of the semantic view. |
|
NUMBER |
Internal, Snowflake-generated identifier for the schema that the semantic view belongs to. |
|
VARCHAR |
Schema that the semantic view belongs to. |
|
NUMBER |
Internal, Snowflake-generated identifier for the database that the semantic view belongs to. |
|
VARCHAR |
Database that the semantic view belongs to. |
|
VARCHAR |
Name of the role that owns the semantic view. |
|
TIMESTAMP_LTZ |
Creation time of the semantic view. |
|
TIMESTAMP_LTZ |
Date and time the object was last altered by a DML, DDL, or background metadata operation. |
|
TIMESTAMP_LTZ |
Date and time the object was last altered by a DML, DDL, or background metadata operation. See Usage Notes. |
|
VARCHAR |
Comment for the semantic view. |
Usage notes¶
Latency for the view can be up to 120 minutes (2 hours).
The LAST_ALTERED column is updated when the following operations are performed on an object:
DDL operations.
DML operations (for tables only). This column is updated even when no rows are affected by the DML statement.
Background maintenance operations on metadata performed by Snowflake.
Examples¶
Retrieve the semantic view O_TPCH_SEMANTIC_VIEW
in the database MY_DB
:
SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.SEMANTIC_VIEWS
WHERE semantic_view_name = 'O_TPCH_SEMANTIC_VIEW'
AND semantic_view_database_name = 'MY_DB';
+------------------+----------------------+-------------------------+---------------------------+---------------------------+-----------------------------+-----------------+-------------------------------+-------------------------------+---------+---------+
| SEMANTIC_VIEW_ID | SEMANTIC_VIEW_NAME | SEMANTIC_VIEW_SCHEMA_ID | SEMANTIC_VIEW_SCHEMA_NAME | SEMANTIC_VIEW_DATABASE_ID | SEMANTIC_VIEW_DATABASE_NAME | OWNER | CREATED | LAST_ALTERED | DELETED | COMMENT |
|------------------+----------------------+-------------------------+---------------------------+---------------------------+-----------------------------+-----------------+-------------------------------+-------------------------------+---------+---------|
| 49 | O_TPCH_SEMANTIC_VIEW | 92 | MY_SCHEMA | 7 | MY_DB | DYOSHINAGA_ROLE | 2025-02-28 16:16:04.002 -0800 | 2025-02-28 16:16:04.589 -0800 | NULL | NULL |
+------------------+----------------------+-------------------------+---------------------------+---------------------------+-----------------------------+-----------------+-------------------------------+-------------------------------+---------+---------+