dbt-labs / dbt-labs/dbt-adapters
[Feature] Model-level descriptions for Snowflake Iceberg tables
- Dominant language
- Python
- Stars
- 233
- Forks
- 362
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 9
Description
### Is this your first time submitting a feature request?
- [x] I have read the [expectations for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations)
- [x] I have searched the existing issues, and I could not find an existing issue for this feature
- [x] I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion
### Describe the feature
Enable model-level descriptions for Snowflake Iceberg tables.
### Describe alternatives you've considered
_No response_
### Who will this benefit?
People using Iceberg tables.
### Are you interested in contributing this feature?
Update [this](https://github.com/dbt-labs/dbt-adapters/blob/c16cc7047e8678f8bb88ae294f43da2c68e9f5cc/dbt-snowflake/src/dbt/include/snowflake/macros/adapters.sql#L95-L107) to something like:
```sql
{% macro snowflake__alter_relation_comment(relation, relation_comment) -%}
{%- if relation.is_dynamic_table -%}
{%- set relation_type = 'dynamic table' -%}
{%- elif relation.is_iceberg_format -%}
{%- set relation_type = 'iceberg table' -%}
{%- else -%}
{%- set relation_type = relation.type -%}
{%- endif -%}
{%- if relation.is_iceberg_format -%}
alter iceberg table {{ relation.render() }} set comment = $${{ relation_comment | replace('$', '[$]') }}$$;
{%- else -%}
comment on {{ relation_type }} {{ relation.render() }} IS $${{ relation_comment | replace('$', '[$]') }}$$;
{%- endif -%}
{% endmacro %}
```
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.