Skip to main content

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.

Installation

  1. Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Clone the repository and navigate to the project directory:
git clone <repository-url>
cd dbt-buddy
  1. Install dependencies:
uv sync

Prerequisites

  1. 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.

Available commands

  1. 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

  1. -m <model_name>, --model <model_name>(required). The name of existing dbt-model.
  2. --project-dir. The path to directory with dbt_project.yml. Default is the current working directory.
  3. --profiles-dir. The path to directory with profiles.yml. Default is the current working directory.
  4. -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.
  5. -e, --examples. If specified, YandexGPT will try to add column's possible accepted values (especially relevant if the SQL-query explicitly specifies values with the CASE statement).
  6. -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


Download files

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

Source Distribution

dbt_buddy-0.1.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbt_buddy-0.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file dbt_buddy-0.1.0.tar.gz.

File metadata

  • Download URL: dbt_buddy-0.1.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.10

File hashes

Hashes for dbt_buddy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2ee7854cf2ed9432bea455700b5fbcc907dbfca6ab4fb218344fec1e47bb483f
MD5 83b1a08ca1e5d10b3b6952c9fa891653
BLAKE2b-256 a21c00c953bcbb51c51c19092d0a117918d2f8d47d0f0f79a4aeb77a9332fdf3

See more details on using hashes here.

File details

Details for the file dbt_buddy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dbt_buddy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.10

File hashes

Hashes for dbt_buddy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07deee8f3db91a1b2c38e7d67b03d534a1543b9fb550a9c428b7fc914e4b1a75
MD5 3325b3cd7d910e66fd177e5b9197fd4d
BLAKE2b-256 e46800b9ae2c0b895867110787338c7c5027e855ae86646da6742a41dea4c37b

See more details on using hashes here.

Supported by

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