- Schemas:
SEMANTIC_ RELATIONSHIPS view¶
This ACCOUNT_USAGE view displays a row for each relationship defined in a semantic view.
Columns¶
| Column name | Data type | Description |
|---|---|---|
semantic_relationship_id | NUMBER | Internal, Snowflake-generated identifier for the relationship in the semantic view. |
semantic_relationship_name | VARCHAR | Name of the relationship in the semantic view. |
semantic_view_id | NUMBER | Internal, Snowflake-generated identifier for the semantic view in which the relationship is defined. |
semantic_view_name | VARCHAR | Name of the semantic view in which the relationship is defined. |
semantic_view_schema_id | NUMBER | Internal, Snowflake-generated identifier for the schema that the semantic view belongs to. |
semantic_view_schema_name | VARCHAR | Schema that the semantic view belongs to. |
semantic_view_database_id | NUMBER | Internal, Snowflake-generated identifier for the database that the semantic view belongs to. |
semantic_view_database_name | VARCHAR | Database that the semantic view belongs to. |
semantic_table_id | NUMBER | Internal, Snowflake-generated identifier for the logical table being referenced. |
semantic_table_name | VARCHAR | Name of the logical table referencing the other table. |
ref_semantic_table_id | NUMBER | Internal, Snowflake-generated identifier for the logical table referencing the other table. |
ref_semantic_table_name | VARCHAR | Name of the logical table being referenced. |
foreign_keys | ARRAY(VARCHAR) | List of the names of the columns referring to the columns of the other table. |
ref_keys | ARRAY(VARCHAR) | One of the following values:
|
created | TIMESTAMP_LTZ | Creation time of the relationship. |
last_altered | TIMESTAMP_LTZ | Date and time the object was last altered by a DML, DDL, or background metadata operation. See |
deleted | TIMESTAMP_LTZ | Date and time when the relationship was dropped. |
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 list of all relationships for the semantic view O_TPCH_SEMANTIC_VIEW in the database MY_DB: