-
Notifications
You must be signed in to change notification settings - Fork 181
feature: Metric views #1285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1.12.latest
Are you sure you want to change the base?
feature: Metric views #1285
Conversation
### Description I don't know how this was happening, since the code for change detection seems to not return a TagsConfig when I go into via debug, but we were calling alter with an empty set tags set, which was raising exceptions. ### Checklist - [x] I have run this code in development and it appears to resolve the stated issue - [x] This PR includes tests, or tests are not required/relevant for this PR - [ ] I have updated the `CHANGELOG.md` and added information about my change to the "dbt-databricks next" section.
### Description Migrating to SDK for every REST call ### Checklist - [x] I have run this code in development and it appears to resolve the stated issue - [x] This PR includes tests, or tests are not required/relevant for this PR - [x] I have updated the `CHANGELOG.md` and added information about my change to the "dbt-databricks next" section. --------- Co-authored-by: Eric Jang <eric.jang@databricks.com>
Resolved merge conflicts and fixed metric view issues: - tags.sql: Restored metric view handling (ALTER METRIC VIEW is invalid SQL, must use ALTER VIEW for metric views) - replace.sql: Fixed to check target_relation.is_metric_view since metric views are stored as VIEW type in information_schema - metric_view.sql: Simplified to always use CREATE OR REPLACE to avoid type mismatch issues between ViewConfig and MetricViewConfig - relation.py: Merged metric view support with iceberg can_be_replaced support All unit tests (710) and metric view functional tests (11) pass.
TestDebugMetricViewChanges was a debugging artifact: - Named 'Debug' indicating temporary purpose - Functionality already covered by TestMetricViewSimpleChanges - view_update_via_alter config no longer changes behavior after simplification
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||
|
@ericj-db Any update on this feature? 🙏 |
|
Is there an estimated timeline for when this will be available as a feature in dbt? At the moment, we're creating Databricks Metric views directly in Databricks, but we're losing lineage information for the Metric view. |
Looking to get an alpha together next week. Still discussing with dbt Labs about when to release our 1.12.0 |
Thank you, this is very helpful. We are looking forward to it. |
|
@sd-db I updated to include alter semantics per internal PRD discussion. Ready for final code review. |
Description
Adds initial implementation of UC metric views as a materialization
Checklist
CHANGELOG.mdand added information about my change to the "dbt-databricks next" section.