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
🤔 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
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
This project was generated with python-package-template
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for dbt_subdocs-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39ebb279198fc38bb80b5cbb6e3ac9bda385a6add035ba3c883a056efd509761 |
|
MD5 | d2ff560ecdb417b19ad5ffea597bbc11 |
|
BLAKE2b-256 | c19043b06c796d7bb73ad0ae178c6553db10e105f0ea575f1cbd2a1650a25769 |