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

Fix table comment setting in Iceberg tables

Open dlouseiro opened this issue 10 months ago • 1 comments

resolves https://github.com/dbt-labs/dbt-adapters/issues/770

Problem

Persisting table comments in Iceberg tables fails as comment on ... is ... notation does not work for Iceberg tables.

Solution

  • Update snowflake__alter_relation_comment to set relation_type = 'iceberg table' when the is_iceberg_format is True.
  • Change code to use alter <relation type> ... set comment = ... notation instead of comment on ... is ... notation

Checklist

  • [x] I have read the contributing guide and understand what's expected of me
  • [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] 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

dlouseiro avatar Jan 28 '25 12:01 dlouseiro

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @dlouseiro

cla-bot[bot] avatar Jan 28 '25 12:01 cla-bot[bot]

Closing in favour of this one in the monorepo

dlouseiro avatar Jul 09 '25 11:07 dlouseiro