Single Documentation Across All Targets (DEV, UAT, PROD)

Hi Everyone,

I just did my homework (I believe) and read the great posts about different projects structures together with pros and cons around documentation

Here’s one post and here’s the other one

I ended up going with Amy’s Option 4 (thanks Amy for this insightful post)

Now, everything is working as expected EXCEPT for one thing:

when using “dbt docs generate”, I always MUST specify a target (I have three: DEV, UAT, and PROD), and the generated documentation is ONLY generated for one target at the time. Also, the generated documentation gets overwritten when changing across targets.

Am I missing something with the “dbt docs generate” command? Ideally, I would like to generate a consolidate documentation that includes all projects (this is ALREADY solved, thanks to Amy) but ALSO includes all targets/environments (e.g. DEV, UAT and PROD)

(BTW, I am aware that “dbt docs” generates some simple html and json files; however, before I do any manual work with them I wanted to check with the community and make sure I am not missing anything here)

Anyone from the DBT team or broader community with some input on this?

Hello Wilson! I’m glad that you found my writing helpful. :slight_smile: You are right, at the moment, dbt docs generate can only take into account one target. This is because dbt docs is only able to parse the project in one environment. I would be curious to ask what your use case would be for all of the targets. Do you picture in the docs, when you select a model, you see a list of all of the objects related to that dbt model, regardless of the environment you generated the docs from?