Skip to main content

Hot evaluation of dbt DAG selectors

Project description

HotDAG

PyPI - Version GitHub Workflow Status (with branch)


HotDAG is a lightweight tool that allows for testing for dbt node selectors against dbt project manifests on a local filesystem, stored on dbt Cloud, or located remotely. Once evaluated, this selection of nodes can be returned as a list of unique_ids, a JSON list of unique_ids, or as an SVG of the selection.

Table of Contents

But Why Though?

Sometimes, it can be valuable while developing locally to have a means of quickly testing a selection string against the production version of a dbt project without fiddling with the generated docs site or compiling the current production branch. Instead, HotDAG lets you quickly test and visualize your selection using your project's manifest, whether its on your local file system, stored remotely and accessible via URL, or hosted on dbt Cloud.

Installation

pip install hotdag

Getting Started

There are a few primary ways to use HotDAG. The most common way is to load a local manifest file and list the selection. This is roughly equivalent to using dbt ls

hotdag --input file --file targets/manifest.json --select "resource_type:source+"

source.example.example.users
model.example.stg_users
model.example.users
test.example.not_null_stg_users_id
test.example.unique_stg_users_id

HotDAG really shines, however, if you want to see a diagram of the selection.

hotdag --input file --output svg \
    --file targets/manifest.json \
    --select "resource_type:source+"

graph.png

Also of use is the ability to directly reference the latest manifest from your project's dbt Cloud job. For example:

hotdag --input dbt_cloud --output svg \
    --account-id 1234 --job-id 9876 \
    --select "resource_type:source+"

Roadmap

  • Styling the SVG output to better distinguish between node types.
  • Improved error handling for remote resource failures.
  • Add rational defaults (e.g. default input to file and --file to the targets directory)
  • Verify support for Selectors (as defined in yaml)

License

hotdag is distributed under the terms of the MIT license.

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

hotdag-0.7.2.tar.gz (59.9 kB view details)

Uploaded Source

Built Distribution

hotdag-0.7.2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file hotdag-0.7.2.tar.gz.

File metadata

  • Download URL: hotdag-0.7.2.tar.gz
  • Upload date:
  • Size: 59.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for hotdag-0.7.2.tar.gz
Algorithm Hash digest
SHA256 983bd0d2b2848b3d7639ce974d7b746259ae96af59dbf1ba7690342007cce7d1
MD5 744915f8e21b0738130e186c30338384
BLAKE2b-256 2bc3bb15e9b699ae1baaba499a60c9289fa9a506f61ef79705a0fcf63f87b95c

See more details on using hashes here.

File details

Details for the file hotdag-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: hotdag-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for hotdag-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 43ad77850b4a777cef6780dc87bd452904ff4bbcd1a514b0560885fb6c6beb1f
MD5 7fcda9666f43f44d9695273007c77c2f
BLAKE2b-256 c7f5f0dc1d4ad4d30a3f3c7ee327c6cdcbed673c98d9097016c7fb7facbfcd00

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