You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: knowledge_base/metric_view/README.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,13 @@
1
1
# Unity Catalog Metric View
2
2
3
-
This project demonstrates how to create a [Unity Catalog Metric View](https://docs.databricks.com/aws/en/metric-views/) using Databricks Asset Bundles. Once registered, the metric view becomes available to analysts and BI tools across your workspace, queryable via the `MEASURE()` SQL function.
3
+
This project demonstrates how to create a [Unity Catalog Metric View](https://docs.databricks.com/aws/en/metric-views/) using Declarative Automation Bundles. Once registered, the metric view becomes available to analysts and BI tools across your workspace, queryable via the `MEASURE()` SQL function.
This project defines `bookings_kpis`, a metric view over the public sample dataset `samples.wanderbricks.bookings`.
8
+
## `bookings_kpis`metric view
10
9
11
-
### Metric View Definition
10
+
This project defines `bookings_kpis`, a metric view over the public sample dataset `samples.wanderbricks.bookings`.
12
11
13
12
A SQL task in the job runs `CREATE OR REPLACE VIEW … WITH METRICS LANGUAGE YAML` from [`src/bookings_kpis.metric_view.sql`](src/bookings_kpis.metric_view.sql):
14
13
@@ -60,7 +59,7 @@ The view integrates seamlessly with:
60
59
### Prerequisites
61
60
62
61
* Databricks workspace with Unity Catalog enabled
63
-
* A SQL warehouse on a runtime that supports Unity Catalog metric views (Public Preview; any recent serverless or PRO warehouse)
62
+
* A SQL warehouse on a runtime that supports Unity Catalog metric views
64
63
* Databricks CLI installed and configured
65
64
66
65
### Setup
@@ -84,14 +83,14 @@ databricks bundle run bookings_kpis_metric_view --target prod
84
83
85
84
The metric view will be created at `<catalog>.<your_username>.bookings_kpis` (dev) or `<catalog>.prod.bookings_kpis` (prod).
86
85
87
-
##Advanced Topics
86
+
### Notes
88
87
89
-
**Scheduling:** The job has a daily `periodic` trigger so the view definition is re-applied in production. [Development-mode](https://docs.databricks.com/dev-tools/bundles/deployment-modes.html)deploys pause the trigger automatically, so it only fires after `bundle deploy --target prod`.
88
+
- The job has a daily `periodic` trigger so the view definition is re-applied in production. [Development-mode](https://docs.databricks.com/dev-tools/bundles/deployment-modes.html)pauses the trigger automatically, so it only fires after `bundle deploy --target prod`.
90
89
91
-
**Custom source table:** Point `source:` in the YAML body at any UC table you read from. The sample `samples.wanderbricks.bookings` is convenient for getting started; for production, use a curated table from your own pipeline.
90
+
- Set `source:` in the YAML body to any UC table you read from. The sample `samples.wanderbricks.bookings` is convenient for getting started. For production, use a table from your own pipeline.
92
91
93
92
## Learn More
94
93
95
-
-[Unity Catalog Metric Views](https://docs.databricks.com/aws/en/metric-views/) — Official documentation
Copy file name to clipboardExpand all lines: knowledge_base/metric_view_dbt/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Unity Catalog Metric View using dbt
2
2
3
-
This project demonstrates how to materialize a [Unity Catalog Metric View](https://docs.databricks.com/aws/en/metric-views/) via dbt-databricks using Databricks Asset Bundles. The metric view is defined as a dbt model with the [`metric_view` materialization](https://github.com/databricks/dbt-databricks/pull/1285) added in **dbt-databricks 1.12.0**.
3
+
This project demonstrates how to materialize a [Unity Catalog Metric View](https://docs.databricks.com/metric-views/) via dbt-databricks using Declarative Automation Bundles. The metric view is defined as a dbt model with the [`metric_view` materialization](https://github.com/databricks/dbt-databricks/pull/1285) added in **dbt-databricks 1.12.0**.
0 commit comments