Skip to main content

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

Project description

dbt-subdocs

Build status Python Version Dependencies Status

Code style: black Security: bandit Pre-commit Semantic Versions License 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

cd DIRECTORY
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

License

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

📃 Citation

@misc{dbt-subdocs,
  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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt-subdocs-0.1.1.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

dbt_subdocs-0.1.1-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page