-
Notifications
You must be signed in to change notification settings - Fork 55
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
Set the table comment when creating the table #317
Set the table comment when creating the table #317
Conversation
db7eb96
to
da19fab
Compare
Can you add a test or modifying existing one for that ? |
@hovaesco This is already tested by |
@Fokko please squash the commits |
25e3d7a
to
df6e78f
Compare
This avoids a schema change in Iceberg when dbt does an: ```sql comment on table sandbox.dbt_trino.rides is 'Combined table of NYC Taxi rides with the locations' ```
df6e78f
to
eb66406
Compare
@Fokko could you explain a little bit more why this change is needed? What is wrong with current behaviour? |
@damian3031 Certainly. In Iceberg we keep track of the changes to a schema. If you set the table comment: {{ config(
persist_docs={"relation": true},
file_format="iceberg"
) }} This will first create the table: create table sandbox.dbt_trino.rides__dbt_tmp
comment 'Combined table of NYC Taxi rides with the locations' And then later it will do an: comment on table sandbox.dbt_trino.rides is 'Combined table of NYC Taxi rides with the locations' With this change, the comment will be set on table creation. When the I'm hesitant to remove the |
This avoids a schema change in Iceberg when dbt does an:
Because the comment is already there.
Overview
Checklist
README.md
updated and added information about my changechangie new
to create a changelog entry