dbt-databricks icon indicating copy to clipboard operation
dbt-databricks copied to clipboard

Materialization v2 with update_via_alter for nonexistent columns

Open karasda opened this issue 7 months ago • 3 comments

Describe the bug

When you use materialization_v2 with views with update_via_alter it attempts to push all comments from yml to databricks regardless if they exist.

Steps To Reproduce

  1. Create a model (view). In relevant .yml add a column which does not exist in .sql
  2. Run the model (creation)
  3. Run the model (again)

Expected behavior

During both run the nonexistent columns are skiped when transfering their comments to DBX.

System information

We use dbt-databricks 1.10.14, dt-core 1.10.13 and tested it for dbt 1.11 as well.

Additional context

Might be solved by https://github.com/databricks/dbt-databricks/pull/1358?

karasda avatar Apr 14 '26 14:04 karasda

Hi @karasda Thanks for bringing this up. Will look into it.

tejassp-db avatar Apr 20 '26 10:04 tejassp-db

Hi @karasda This looks like a bug. I will review the associated PR. Thanks for the PR.

tejassp-db avatar Apr 21 '26 14:04 tejassp-db

It's not my PR (sorry) but I really hope that it would solve our issue :-) We plan to do the version bump soon and the earlier fixed gets merged to stable version, the higher chance that it will be included in our upgrade. Thanks for looking into it!

karasda avatar Apr 21 '26 14:04 karasda