Schemas:

ACCOUNT_USAGE

SEMANTIC_DIMENSIONS view

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

See also:

SEMANTIC_DIMENSIONS view (Information Schema)

Columns

Column nameData typeDescription
semantic_dimension_idNUMBERID of the dimension in the semantic view.
semantic_dimension_nameVARCHARName of the dimension in the semantic view.
semantic_table_idNUMBERID of the semantic table the dimension belongs to.
semantic_table_nameVARCHARName of the semantic table the dimension belongs to.
semantic_view_idNUMBERID of the semantic view.
semantic_view_nameVARCHARName of the semantic view.
semantic_view_schema_idNUMBERID of the schema to which the semantic view belongs.
semantic_view_schema_nameVARCHARSchema to which the semantic view belongs.
semantic_view_database_idNUMBERID of the database to which the semantic view belongs.
semantic_view_database_nameVARCHARDatabase to which the semantic view belongs.
data_typeVARCHARData type of the dimension expression.
expressionVARCHARThe SQL expression used to calculate the dimension.
synonymsARRAY(VARCHAR)List of the synonyms for the dimension.
createdTIMESTAMP_LTZCreation time of the dimension.
last_alteredTIMESTAMP_LTZ

Date and time the object was last altered by a DML, DDL, or background metadata operation. See Usage Notes_.

deletedTIMESTAMP_LTZDate and time when the dimension was dropped.
commentVARCHARDescription of the dimension.
cortex_search_service_databaseVARCHARName of the database containing the Cortex Search Service that the dimension uses.
cortex_search_service_schemaVARCHARName of the schema containing the Cortex Search Service that the dimension uses.
cortex_search_serviceVARCHARName of the Cortex Search Service that the dimension uses.
cortex_search_service_columnVARCHARName of the column that the Cortex Search Service allows you to search on, if the dimension uses a Cortex Search Service.

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

SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.SEMANTIC_DIMENSIONS
  WHERE semantic_view_name = 'O_TPCH_SEMANTIC_VIEW'
    AND semantic_view_database_name = 'MY_DB';
+-----------------------+------------------------------------+-------------------+---------------------+------------------+----------------------+-------------------------+---------------------------+---------------------------+-----------------------------+-------------+----------------------+----------+-------------------------------+-------------------------------+---------+---------+
| SEMANTIC_DIMENSION_ID | SEMANTIC_DIMENSION_NAME            | SEMANTIC_TABLE_ID | SEMANTIC_TABLE_NAME | SEMANTIC_VIEW_ID | SEMANTIC_VIEW_NAME   | SEMANTIC_VIEW_SCHEMA_ID | SEMANTIC_VIEW_SCHEMA_NAME | SEMANTIC_VIEW_DATABASE_ID | SEMANTIC_VIEW_DATABASE_NAME | DATA_TYPE   | EXPRESSION           | SYNONYMS | CREATED                       | LAST_ALTERED                  | DELETED | COMMENT |
|-----------------------+------------------------------------+-------------------+---------------------+------------------+----------------------+-------------------------+---------------------------+---------------------------+-----------------------------+-------------+----------------------+----------+-------------------------------+-------------------------------+---------+---------|
|                   391 | D_CUSTOMER_REGION_NAME_FROM_REGION |                99 | CUSTOMER            |               49 | O_TPCH_SEMANTIC_VIEW |                      92 | MY_SCHEMA                 |                         7 | MY_DB                       | VARCHAR(25) | region.d_region_name | NULL     | 2025-02-28 16:16:04.389 -0800 | 2025-02-28 16:16:04.389 -0800 | NULL    | NULL    |
|                   392 | D_CUSTOMER_NATION_NAME             |                99 | CUSTOMER            |               49 | O_TPCH_SEMANTIC_VIEW |                      92 | MY_SCHEMA                 |                         7 | MY_DB                       | VARCHAR(25) | nation.d_nation_name | NULL     | 2025-02-28 16:16:04.389 -0800 | 2025-02-28 16:16:04.389 -0800 | NULL    | NULL    |
|                   393 | D_CUSTOMER_MARKET_SEGMENT          |                99 | CUSTOMER            |               49 | O_TPCH_SEMANTIC_VIEW |                      92 | MY_SCHEMA                 |                         7 | MY_DB                       | VARCHAR(10) | c_mktsegment         | NULL     | 2025-02-28 16:16:04.389 -0800 | 2025-02-28 16:16:04.389 -0800 | NULL    | NULL    |
|                   387 | D_NATION_NAME                      |                98 | NATION              |               49 | O_TPCH_SEMANTIC_VIEW |                      92 | MY_SCHEMA                 |                         7 | MY_DB                       | VARCHAR(25) | n_name               | NULL     | 2025-02-28 16:16:04.388 -0800 | 2025-02-28 16:16:04.388 -0800 | NULL    | NULL    |
|                   389 | D_REGION_NAME                      |                97 | REGION              |               49 | O_TPCH_SEMANTIC_VIEW |                      92 | MY_SCHEMA                 |                         7 | MY_DB                       | VARCHAR(25) | r_name               | NULL     | 2025-02-28 16:16:04.389 -0800 | 2025-02-28 16:16:04.389 -0800 | NULL    | NULL    |
|                   394 | D_CUSTOMER_COUNTRY_CODE            |                99 | CUSTOMER            |               49 | O_TPCH_SEMANTIC_VIEW |                      92 | MY_SCHEMA                 |                         7 | MY_DB                       | VARCHAR(15) | LEFT(c_phone, 2)     | NULL     | 2025-02-28 16:16:04.389 -0800 | 2025-02-28 16:16:04.389 -0800 | NULL    | NULL    |
|                   390 | D_CUSTOMER_REGION_NAME             |                99 | CUSTOMER            |               49 | O_TPCH_SEMANTIC_VIEW |                      92 | MY_SCHEMA                 |                         7 | MY_DB                       | VARCHAR(25) | nation.d_region_name | NULL     | 2025-02-28 16:16:04.389 -0800 | 2025-02-28 16:16:04.389 -0800 | NULL    | NULL    |
|                   388 | D_REGION_NAME                      |                98 | NATION              |               49 | O_TPCH_SEMANTIC_VIEW |                      92 | MY_SCHEMA                 |                         7 | MY_DB                       | VARCHAR(25) | region.d_region_name | NULL     | 2025-02-28 16:16:04.389 -0800 | 2025-02-28 16:16:04.389 -0800 | NULL    | NULL    |
+-----------------------+------------------------------------+-------------------+---------------------+------------------+----------------------+-------------------------+---------------------------+---------------------------+-----------------------------+-------------+----------------------+----------+-------------------------------+-------------------------------+---------+---------+