Skip to content

fix: apply tblproperties to metric_view models at create time#1530

Open
sd-db wants to merge 1 commit into
mainfrom
sd-db/fix/metric-view-tblproperties-on-create
Open

fix: apply tblproperties to metric_view models at create time#1530
sd-db wants to merge 1 commit into
mainfrom
sd-db/fix/metric-view-tblproperties-on-create

Conversation

@sd-db

@sd-db sd-db commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Description

tblproperties configured on a metric_view model were not applied on the first build — dbt run reported success but the configured properties were absent from the created view; they only appeared on a later alter/replace run. The create branch of the metric_view materialization applied databricks_tags but not tblproperties.

This applies tblproperties on the create branch, mirroring the existing replace_with_metric_view path ({% if tblproperties %}{{ apply_tblproperties(...) }}{% endif %}).

Closes #1527

Testing

  • Full tests/functional/adapter/metric_views/test_metric_view_materialization.py7 passed (no regression), on databricks_uc_sql_endpoint.
  • ruff / ruff format / mypy clean.

@sd-db sd-db requested a review from jprakash-db as a code owner June 16, 2026 13:04
The metric_view create branch applied databricks_tags but not
tblproperties, so tblproperties configured on a model were dropped on the
first build and only applied on a later alter/replace run. Apply them on
the create branch, mirroring replace_with_metric_view.

Closes #1527
@sd-db sd-db force-pushed the sd-db/fix/metric-view-tblproperties-on-create branch from e7dbec4 to 19cc61e Compare June 16, 2026 13:10
@github-actions

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@sd-db

sd-db commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator Author

/integration-test

@github-actions

Copy link
Copy Markdown

Integration tests dispatched for PR #1530 by @sd-db. Track progress in the Actions tab.

@github-actions

Copy link
Copy Markdown

Integration results for PR #1530 — UC cluster ✅ success · SQL warehouse ✅ success · All-purpose cluster ❌ failure · Shard coverage ✅ success

Run details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

metric_view: tblproperties configured on a model are silently dropped on first create

1 participant