-
Notifications
You must be signed in to change notification settings - Fork 174
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
Snowflake Persist Docs (Materialization == Views, column level descriptions) #17
Comments
@kevnoo Thanks for opening! See also: dbt-labs/dbt-core#2334, dbt-labs/dbt-core#2321 To put it simply, dbt's view materialization on Snowflake uses
In order for dbt to include a full column list at time of view creation, we'd need to pursue one of two potential routes:
If I recall correctly, when we initially implemented Does any of the above speak to you? |
Thanks - this is helpful @jtcohen6. Let me think it over and try to take a stab at a solution. Leaning towards dbt-labs/dbt-core#2 right now but understand the additional benefits that would come from dbt-labs/dbt-core#1. |
@kevnoo we have a similar requirement for persisting column level comments for Snowflake views. Is there something we can use currently as workaround to persist comments for views columns. Or we need to wait for this feature in next release? |
Describe the feature
Given the database adapter is Snowflake, materialization type is View and persist docs is set true - create the view using the following snowflake syntax so that column descriptions from dbt schema.yml files are include:
CREATE OR REPLACE VIEW (COL1 COMMENT 'COMMENT', COLN COMMENT 'COMMENT') AS SELECT COL1, COLN FROM TABLE;
Describe alternatives you've considered
I am looking into submitting a PR myself but would benefit from oversight. We have also considered contacting Snowflake to include alter capabilities for columns within a view but believe this to be another alternative.
Additional context
Snowflake
Who will this benefit?
All users of Snowflake who heavily rely on views and would like to use persist docs to capture doc details within the database itself for external dependencies
Are you interested in contributing this feature?
Yes - more than happy to help - just require a push in the right direction
The text was updated successfully, but these errors were encountered: