Schemas:

ACCOUNT_USAGE

SEMANTIC_VARIABLES view

This ACCOUNT_USAGE view displays a row for each variable defined in a semantic view.

Columns

Column nameData typeDescription
semantic_variable_idNUMBERInternal, Snowflake-generated identifier for the variable.
semantic_variable_nameVARCHARName of the variable.
semantic_view_idNUMBERInternal, Snowflake-generated identifier for the semantic view.
semantic_view_nameVARCHARName of the semantic view.
semantic_view_schema_idNUMBERInternal, Snowflake-generated identifier for the schema that the semantic view belongs to.
semantic_view_schema_nameVARCHARSchema that the semantic view belongs to.
semantic_view_database_idNUMBERInternal, Snowflake-generated identifier for the database that the semantic view belongs to.
semantic_view_database_nameVARCHARDatabase that the semantic view belongs to.
data_typeVARCHARData type of the variable.
default_valueVARCHARDefault value of the variable, if specified.
createdTIMESTAMP_LTZDate and time the variable was created.
last_alteredTIMESTAMP_LTZDate and time the object was last altered by a DML, DDL, or background metadata operation.
deletedTIMESTAMP_LTZDate and time the variable was deleted.
commentVARCHARDescription of the variable.

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 variables for the semantic view SALES_ANALYTICS in the database MY_DB:

SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.SEMANTIC_VARIABLES
  WHERE semantic_view_name = 'SALES_ANALYTICS'
    AND semantic_view_database_name = 'MY_DB';