AI-based documentation for dbt-models
Project description
dbt-buddy
Autogenerated documentation for dbt-models using YandexGPT LLM
dbt-buddy
is a python package with CLI that allows automatically create YAML-based documenation for existing dbt-model. Built-in method fill_yaml_with_column_description()
will add columns description in Russian language using LLM-model YandexGPT.
Prerequisites
- You need to create
.env
file in the dbt-project working directory and add the following secret:API_KEY=<secret key>
- required to access YandexGPT API.CATALOG_ID=<catalog identifier>
- Yandex Cloud catalog ID is a part of API request.
dbt-buddy
uses dbt-macros from dbt-codegen package. It is necessary to install it by simply adding it to project'spackages.yml
file:
packages:
- package: dbt-labs/codegen
version: 0.12.1
Then run command:
$ dbt deps
Available commands
document
- generates YAML-based documentation with AI-proposed columms description.
document
You can create documentation by simply running the command:
$ buddy document --model <dbt-model name>
The result will be a text string in the console, formatted in a documentation format acceptable for dbt.
CLI Options
-m <model_name>
,--model <model_name>
(required). The name of existing dbt-model.--project-dir
. The path to directory with dbt_project.yml. Default is the current working directory.--profiles-dir
. The path to directory with profiles.yml. Default is the current working directory.-s
,--save
. If specified, the generated documentation is saved in a YAML-file in the same directory and with the same name as the specified model.-e
,--examples
. If specified, YandexGPT will try to add column's possible accepted values (especially relevant if the SQL-query explicitly specifies values with theCASE
statement).-v
,--verbose
. If specified, the response from the YandexGPT API will be displayed in the console.
You can get the full list of existing options by running the command:
$ buddy document --help
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
File details
Details for the file dbt_buddy-0.0.2.tar.gz
.
File metadata
- Download URL: dbt_buddy-0.0.2.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e1fd8c2a36de8677c8b46a750f1e9c2ac809c3a1778fead2509e8a5130c190d |
|
MD5 | 3fb447e9c7cbc8a22e49aaf902d0e8bb |
|
BLAKE2b-256 | d169851f7ee7b2151585f834f3b9ade2ce76788de87b2aa64d86c0d6bd11a5ee |
File details
Details for the file dbt_buddy-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: dbt_buddy-0.0.2-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f67fb1d7ab2a50ccc14e4185f1a857a80896af85aa8734be2bb3837d7dc2291c |
|
MD5 | 10df5a71dd65b6c9eae81eb8b291e31e |
|
BLAKE2b-256 | 19382fa4ee27f49baa4c9eea3cdab49dbec5480a9497410e57d1c589f7519869 |