A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-alter-view below:

ALTER VIEW | Databricks Documentation




> ALTER VIEW tempsc1.v1 RENAME TO tempsc1.v2;


> DESCRIBE TABLE EXTENDED tempsc1.v2;
c1 int NULL
c2 string NULL


Database tempsc1
Table v2


> DESCRIBE TABLE EXTENDED tempsc1.v2;
c1 int null
c2 string null


Database tempsc1
Table v2
Table Properties [....]


> ALTER VIEW tempsc1.v2 SET TBLPROPERTIES ('created.by.user' = "John", 'created.date' = '01-01-2001' );


> DESCRIBE TABLE EXTENDED tempsc1.v2;
c1 int NULL
c2 string NULL


Database tempsc1
Table v2
Table Properties [created.by.user=John, created.date=01-01-2001, ....]


> ALTER VIEW tempsc1.v2 UNSET TBLPROPERTIES (`created`.`by`.`user`, created.date);


> DESCRIBE TABLE EXTENDED tempsc1.v2;
c1 int NULL
c2 string NULL


Database tempsc1
Table v2
Table Properties [....]


> ALTER VIEW tempsc1.v2 AS SELECT * FROM tempsc1.v1;


> DESCRIBE TABLE EXTENDED tempsc1.v2;
c1 int NULL
c2 string NULL


Database tempsc1
Table v2
Type VIEW
View Text select * from tempsc1.v1
View Original Text select * from tempsc1.v1


> ALTER VIEW v1 OWNER TO `alf@melmak.et`


> ALTER VIEW v1 WITH SCHEMA TYPE EVOLUTION;


> ALTER VIEW test SET TAGS ('tag1' = 'val1', 'tag2' = 'val2', 'tag3' = 'val3');


> ALTER VIEW test UNSET TAGS ('tag1', 'tag2', 'tag3');


> ALTER VIEW region_sales_metrics
AS $$
version: 0.1
source: samples.tpch.orders
filter: o_orderdate > '1990-01-01'
dimensions:
- name: month
expr: date_trunc('MONTH', o_orderdate)
- name: status
expr: case
when o_orderstatus = 'O' then 'Open'
when o_orderstatus = 'P' then 'Processing'
when o_orderstatus = 'F' then 'Fulfilled'
end
- name: order_priority
expr: split(o_orderpriority, '-')[1]
measures:
- name: count_orders
expr: count(1)
- name: total_revenue
expr: SUM(o_totalprice)
- name: total_revenue_per_customer
expr: SUM(o_totalprice) / count(distinct o_custkey)
$$;

> DESCRIBE EXTENDED region_sales_metrics;
col_name data_type
month timestamp
status string
prder_priority string
count_orders bigint measure
total_revenue decimal(28,2) measure
total_revenue_per_customer decimal(38,12) measure


Catalog main
Database default
Table region_sales_metrics
Owner alf@melmak.et
Created Time Sun May 18 23:45:25 UTC 2025
Last Access UNKNOWN
Created By Spark
Type METRIC_VIEW
Comment A metric view for regional sales metrics.
View Text "
version: 0.1
source: samples.tpch.orders
filter: o_orderdate > '1990-01-01'
dimensions:
- name: month
expr: date_trunc('MONTH', o_orderdate)
- name: status
expr: case
when o_orderstatus = 'O' then 'Open'
when o_orderstatus = 'P' then 'Processing'
when o_orderstatus = 'F' then 'Fulfilled'
end
- name: prder_priority
expr: split(o_orderpriority, '-')[1]
measures:
- name: count_orders
expr: count(1)
- name: total_revenue
expr: SUM(o_totalprice)
- name: total_revenue_per_customer
expr: SUM(o_totalprice) / count(distinct o_custkey)
"
Language YAML
Table Properties [metric_view.from.name=samples.tpch.orders, metric_view.from.type=ASSET, metric_view.where=o_orderdate > '1990-01-01']

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4