We have enabled persist_docs, and can add column descriptions to Tables, using schema.yml
However, it doesn’t work for Views. Is there a way to make it work for view?
We are using dbt-core on Databricks. One option we see is post_hook, but the prefernce would be to use something like schema.yml for Views also.
persist_docs | dbt Developer Hub
description | dbt Developer Hub
We also faced this issue and unfortunately the only workaround is a post hook as you mentioned.
But since views gets re-created every time a model is run you have to run all those bunch of alter statement over and over again. Will add up to compute cost in the end.
One other option would be to put all the information into a separate metadata table.
Note: @Maxvan
originally posted this reply in Slack. It might not have transferred perfectly.
1 Like
Which version of dbt are you on? In the newer versions, just like Tables, persist_docs works for Views too, and will propogate column descriptions. My experience is with dbt on snowflake.