Skip to content
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

Correct syntax for mv comments #853

Merged
merged 6 commits into from
Aug 8, 2024

Conversation

jeremyyeo
Copy link
Contributor

@jeremyyeo jeremyyeo commented Jul 12, 2024

resolves #837

Problem

Comments on mv's were using the wrong syntax on redshift.

Solution

Modified the redshift__alter_relation_comment macro so that it has the right syntax.

$ dbt run
...
05:38:04  Using redshift connection "model.my_dbt_project.my_mv"
05:38:04  On model.my_dbt_project.my_mv: /* {"app": "dbt", "dbt_version": "1.9.0a1", "profile_name": "rs", "target_name": "dev", "node_id": "model.my_dbt_project.my_mv"} */

    comment on view "dev"."public"."my_mv" is $dbt_comment_literal_block$Lorem ipsum$dbt_comment_literal_block$;
05:38:05  SQL status: SUCCESS in 0.405 seconds
05:38:05  On model.my_dbt_project.my_mv: COMMIT
...

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@cla-bot cla-bot bot added the cla:yes label Jul 12, 2024
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the dbt-redshift contributing guide.

@jeremyyeo jeremyyeo marked this pull request as ready for review July 15, 2024 04:38
@jeremyyeo jeremyyeo requested a review from a team as a code owner July 15, 2024 04:38
@jeremyyeo
Copy link
Contributor Author

@dbt-labs/adapters I don't really know what I'm doing with the test here - just cribbed what @colin-rogers-dbt had on dbt-labs/dbt-postgres#11 😁

@mikealfare mikealfare enabled auto-merge (squash) August 8, 2024 15:27
@mikealfare mikealfare added the community This PR is from a community member label Aug 8, 2024
@mikealfare mikealfare merged commit 08e50f9 into main Aug 8, 2024
29 of 30 checks passed
@mikealfare mikealfare deleted the fix/837/correct-syntax-for-materialized-views branch August 8, 2024 23:36
github-actions bot pushed a commit that referenced this pull request Sep 12, 2024
* correct syntax for mv comments
* add test and changie

---------

Co-authored-by: Colin Rogers <[email protected]>
Co-authored-by: Mike Alfare <[email protected]>
(cherry picked from commit 08e50f9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.8.latest cla:yes community This PR is from a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] persist_docs not working properly with materialized views
3 participants