I’m new to dbt, and am about to build a number of target models for my new company. One of the key pieces will be utilizing the documentation functionality. However, I want a place to document our source tables / fields. In particular, I only want to document each source field once, even if it is used by multiple target models. Is this a built in feature with dbt? If someone can point me in the right direction to do more research, I’d greatly appreciate it!
Look into using doc blocks for reusable docs.
Note: @Jack Nguyen
originally posted this reply in Slack. It might not have transferred perfectly.
Ditto on leveraging doc blocks. h/t <@U05TBUYDPDW>
You can also play with this upstream_description parameter from codegen:
model_name='YOUR_MODEL_NAME',
upstream_descriptions='TRUE'
) }}```
<sub>Note: `@rho` originally [posted this reply in Slack](https://getdbt.slack.com/archives/CBSQTAPLG/p1697495345869249?thread_ts=1697491340.939189&cid=CBSQTAPLG). It might not have transferred perfectly.</sub>
That didn’t seem to paste well. You can also play with this upstream_description parameter from codegen:
{{ codegen.generate_model_yaml(
model_name='YOUR_MODEL_NAME',
upstream_descriptions='TRUE'
) }}