-
Notifications
You must be signed in to change notification settings - Fork 110
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
Fill in model/column descriptions when available in database metadata #160
Comments
Yep, makes sense, let me ask our Core DX embed how |
+1 In our case, we have several teams that consume Snowflake tables built by other teams (not using dbt) that have column descriptions as comments. We'd like to extract those comments as column descriptions when create the source yml files. |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
@dave-connors-3 any hope of this happening? |
This would be so helpful for us when defining sources from external projects with a huge number of columns. Actually, I started using codegen thinking this was already implemented, as it would save my a considerable amount of time |
I continue to get asked for this and came up with a hacky workaround below for the generate_source macro. I've only tested this on Snowflake though, so it's not yet adapter agnostic: First, an internal macro that grabs the comment instead of calling directly
Then, in the generate_source macro, the column metadata is retrieved via that internal macro and then the comment is included if
|
Describe the feature
Model and column descriptions can be stored in the database using the persist_docs feature. It is sometimes useful to "regenerate" the YAML files for models when tweaks have been made. However, the regenerated YAML has empty descriptions, meaning you need to manually copy and paste the old descriptions. If these descriptions have been stored in the database (persist_docs is set to true), then that could be used as the source to fill in already written descriptions.
Describe alternatives you've considered
Manually copy and paste descriptions from the old yaml into the new yaml.
Additional context
Different databases may store these descriptions differently, but you should be able to reference how persist_docs handles it.
Who will this benefit?
Anybody using codegen to automate the creation of source/model YAML files with descriptions already written.
Are you interested in contributing this feature?
I'm not currently able to
The text was updated successfully, but these errors were encountered: