Description
Returns the originalCREATE SEMANTIC VIEW DDL statement that was used to
create the specified semantic view.
Syntax
SHOW CREATE SEMANTIC VIEW [<db>.]<view_name>
Parameters
| Parameter | Required | Description |
|---|---|---|
db | No | Database containing the semantic view. Defaults to the current database. |
view_name | Yes | Name of the semantic view. |
Return value
| Column | Description |
|---|---|
Semantic View | Name of the semantic view. |
Create Semantic View | Full DDL text of the CREATE SEMANTIC VIEW statement. |
Examples
SHOW CREATE SEMANTIC VIEW sales_db.order_metrics;
+----------------+--------------------------------------------------------------------+
| Semantic View | Create Semantic View |
+----------------+--------------------------------------------------------------------+
| order_metrics | CREATE SEMANTIC VIEW sales_db.order_metrics |
| | TABLES ( |
| | orders AS sales_db.orders PRIMARY KEY (o_orderkey), |
| | customer AS sales_db.customer PRIMARY KEY (c_custkey) |
| | ) |
| | RELATIONSHIPS ( |
| | ord_to_cust AS orders (o_custkey) REFERENCES customer |
| | ) |
| | DIMENSIONS ( |
| | orders.order_date AS o_orderdate |
| | ) |
| | METRICS ( |
| | orders.total_price AS SUM(o_totalprice) |
| | ) |
+----------------+--------------------------------------------------------------------+