Add persist_docs support for semantic views - #7
Open
RyutoYoda wants to merge 1 commit into
Open
Conversation
Implements relation-level persist_docs functionality that automatically adds model descriptions from schema.yml as COMMENT clauses to Semantic View DDL. Key features: - Supports persist_docs.relation configuration - Detects and avoids conflicts with existing inline COMMENT syntax - Follows existing copy_grants pattern for consistency - Includes comprehensive test coverage for both enabled and disabled scenarios Resolves the TODO in semantic_view materialization and addresses the "persist_docs not supported" limitation documented in README.
|
Hey @sfc-gh-yutliu could we push this? 🙏🏻 |
|
This would be great to have! |
Author
|
Hey @sfc-gh-yutliu 👋 Just checking in — any chance this could get a review when you have a moment? Happy to make any changes if needed. Thanks! |
|
This is not only nice to have but a feature that can make the difference between keeping on using dbt / metricflow semantic layer VS fully adopting Snowflake solutions and downstream AI capabilities. Any chance this can be pushed? 🙏 |
sfc-gh-sarur
approved these changes
Aug 6, 2026
Collaborator
|
@RyutoYoda please resolve the conflicts in this PR before merging, thanks |
|
@sfc-gh-sarur @RyutoYoda anything to do to get this merged? Not familiar on how to contribute/finish for this, but as @LizzyHunter said this will increase adoption of Snowflake semantic views for teams like mine that use dbt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements relation-level
persist_docsfunctionality for semantic views, addressing the "persist_docs not supported" limitation mentioned in the README and resolving the TODO comment in the materialization.schema.ymlasCOMMENTclauses to Semantic View DDLCOMMENTsyntaxcopy_grantspattern for consistencyUsage Example
Results in DDL with:
COMMENT='Customer metrics for analysis'Test Plan
Changes
macros/relations/semantic_view/create.sqlwith newappend_comment_if_missingmacromacros/materializations/semantic_view.sqlto remove TODO comment