Build status
Python Version
Dependencies Status

Code style: black
Security: bandit
Semantic Versions
Coverage Report

dbt-subdocs is a python CLI you can used to generate a dbt-docs for a subset of your dbt project

? Description

This project is useful if you want to generate a dbt-docs site for a subset of the models in your DBT project.
By default, in dbt-docs, all your projects gets documented :

  • all the models
  • all the sources
  • all the tests
  • and all the macros

This CLI is useful if you only want to document what your end-user will be using.

This CLI simply edits the manifest.json and catalog.json used by the dbt-docs site so they do not
contain nodes you don’t want to display.

✨ Features

  • Configure an input and output directory
  • Select the models to document using tag within DBT
  • Choose to exclude nodes that are useless for your users : tests, macros, seed etc…

? Getting Started

Installation with pip
pip install -U dbt-subdocs

Then you can run

dbt-subdocs --help
First call to the CLI

You can call dbt-subdocs by simply using the command dbt-subdocs
See all the options available using dbt-subdocs --help

Usecase 1: Only display nodes with a specific tag

Assuming your manifest.json and catalog.json are in DIRECTORY, simply call

dbt-subdocs --tag finance

If you want to select nodes with tags finance OR engineering, simply call

dbt-subdocs --tag finance --tag engineering
Usecase 2: Removing macros from the docs

If you want to remove macros from the manifest.json you can call

dbt-subdocs --tag finance --exclude-node-type macros

You can also remove sources by using

dbt-subdocs --tag finance --exclude-node-type macros --exclude-node-type sources

?️ License


This project is licensed under the terms of the MIT license. See LICENSE for more details.

? Citation

  author = {jb-delafosse},
  title = {dbt-subdocs is a python CLI you can used to generate a dbt-docs for a subset of your dbt project},
  year = {2022},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/jb-delafosse/dbt-subdocs}}

Credits ? Your next Python package needs a bleeding-edge project structure.

This project was generated with python-package-template


View Github