-
Notifications
You must be signed in to change notification settings - Fork 121
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
Persist Column level comments when creating views #104
Labels
enhancement
New feature or request
Comments
|
Hi @shuaahvee thanks for opening the issue. I think it would be better to add this feature in |
Thanks! Will do! |
@shuaahvee Thank you for the macros |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the feature
The
persist_docs
config works for tables by materializing a model as a table and then runningALTER TABLE
statements to update the comment on each column. This method does not work for views becauseALTER VIEW
doesn't support adding comments. Instead, comments need to be defined when running theCREATE OR REPLACE VIEW
statement. There should be an option to handle column level comments for models materialized as viewsDescribe alternatives you've considered
I tried creating a macro that adds the necessary comment clause and put it at the top of my model but the SQL gets inserted after the
AS
inCREATE OR REPLACE VIEW AS
Who will this benefit?
This will benefit anyone using column level comments on views in databricks
Are you interested in contributing this feature?
Yes! I overwrote the
adapters.sql
macro to do this. I'll create and link to a PR!The text was updated successfully, but these errors were encountered: