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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file dbt-subdocs-0.1.1.tar.gz.

File metadata

  • Download URL: dbt-subdocs-0.1.1.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.9 CPython/3.9.9 Linux/5.13.19-2-MANJARO

File hashes

Hashes for dbt-subdocs-0.1.1.tar.gz
Algorithm Hash digest
SHA256 64c44f7f2d6406cf2fc9a3f6257461da3a89b97a8dd268057a0d28a37998f969
MD5 1de9c3eb6c63e33db5b25cbb94196d82
BLAKE2b-256 c382a5b03a0bcef3945ccdbc45cb4f6f5485d7389f17386f0eb35a68a80b6c4d

See more details on using hashes here.

File details

Details for the file dbt_subdocs-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dbt_subdocs-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.9 CPython/3.9.9 Linux/5.13.19-2-MANJARO

File hashes

Hashes for dbt_subdocs-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39ebb279198fc38bb80b5cbb6e3ac9bda385a6add035ba3c883a056efd509761
MD5 d2ff560ecdb417b19ad5ffea597bbc11
BLAKE2b-256 c19043b06c796d7bb73ad0ae178c6553db10e105f0ea575f1cbd2a1650a25769

See more details on using hashes here.

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