Single docs page for multiple dbt projects

I have several dbt projects and I want to serve a single docs page grouping all of them. Each project creates its models on different databases, so that’s why I discarded the approach of having a master dbt project importing all of my other projects (when I generate the docs it always takes the database defined in the master project profile’s target in use).

I tried merging each project manifest.json and catalog.json files into single ones by using [this] script, and it made the trick. However, I’m still facing some undesired outputs:

  • If two or more dbt projects use the same source, it will show duplicated in the docs
  • If I create a model in one project and then use it in another one, it will be imported as a source in the second. I would love to point to the ref model instead

Has anyone experienced this and find a fancy solution?

Hey, I have also faced a similar problem, so I have created a GitHub action to generate documentation for multiple projects and publish it to the GitHub Pages on committing to the main branch.

Check this out and use it – Generate DBT Docs · Actions · GitHub Marketplace · GitHub
Demo - GitHub - praneeth527/dbt-docs-demo