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.

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.
  2. dbt-buddy uses dbt-macros from dbt-codegen package. It is necessary to install it by simply adding it to project's packages.yml file:
packages:
  - package: dbt-labs/codegen
    version: 0.12.1

Then run command:

$ dbt deps

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.0.2.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

dbt_buddy-0.0.2-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

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

Hashes for dbt_buddy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1e1fd8c2a36de8677c8b46a750f1e9c2ac809c3a1778fead2509e8a5130c190d
MD5 3fb447e9c7cbc8a22e49aaf902d0e8bb
BLAKE2b-256 d169851f7ee7b2151585f834f3b9ade2ce76788de87b2aa64d86c0d6bd11a5ee

See more details on using hashes here.

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

Hashes for dbt_buddy-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f67fb1d7ab2a50ccc14e4185f1a857a80896af85aa8734be2bb3837d7dc2291c
MD5 10df5a71dd65b6c9eae81eb8b291e31e
BLAKE2b-256 19382fa4ee27f49baa4c9eea3cdab49dbec5480a9497410e57d1c589f7519869

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