-
Notifications
You must be signed in to change notification settings - Fork 116
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
Fix table comment updates #750
Conversation
They should already for MV/ST, but the mechanism is very different. Look at alter.sql for either. Core reason is that for MV/ST we have a mechanism for declaring how we want to handle changes (on_config_change), but I haven't convinced dbt-core yet that we should have the same mechanism for incremental tables. |
Basically, in the absence of on_config_change for other materialization types, you are assuming users want apply. I think that is the correct assumption. Thanks for PR, will review in the next day or so. |
Running functional tests now. |
Please take a look at the non-uc cluster tests; there are few that are failing. |
Signed-off-by: Hendrik Lüdemann <hen.luedemann@gmail.com>
Signed-off-by: Hendrik Lüdemann <hen.luedemann@gmail.com>
I've fixed the tests. I was also able to get |
Rerunning functional tests |
Signed-off-by: Hendrik Lüdemann <hen.luedemann@gmail.com>
I forgot to sign my latest commit and had to force push it again now. |
Apologies for delay, I'm on-call and haven't had much time to review PRs. Will get to this shortly. |
Does this by any chance fix: #763? |
No that issue still persists |
Resolves #732
Description
config.persist_relation_docs()
inpersist_docs
black.ini
and.pre-commit-config.yaml
to fix failingpre-commit
runsThe issue is only about the incremental models. While working on the PR I realized table comments are also not being updated for snapshots and are not created with
dbt clone
.I think comments are also not being updated in materialized views and streaming tables. Since I don't have a good understanding of those materializations, I kept the original behavior by setting
for_relation=False
. The tests would also run through withfor_relation=True
, but this might lead to unnecessary queries that are being send to databricks on the first run of those relations.Generally, the code would be simpler if relation comments are only persisted in
persist_docs
(usingcomment on ...
queries) and not as part ofcreate table
statements. I assume they are persisted as part of thecreate
statement to improve performance?I've ran:
tox -e unit
tox -e integration-databricks-uc-sql-endpoint
tox -e integration-databricks-uc-cluster
Checklist
CHANGELOG.md
and added information about my change to the "dbt-databricks next" section.