hotdag


Namehotdag JSON
Version 0.7.2 PyPI version JSON
download
home_page
SummaryHot evaluation of dbt DAG selectors
upload_time2023-07-20 00:39:24
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements agate anyio attrs babel certifi cffi charset-normalizer click colorama dbt-core dbt-extractor fastapi future graphviz hologram idna isodate jinja2 jsonschema leather logbook loguru markupsafe mashumaro minimal-snowplow-tracker msgpack networkx packaging parsedatetime pathspec protobuf pycparser pydantic pydot pyparsing pyrsistent python-dateutil python-slugify pytimeparse pytz pyyaml requests six sniffio sqlparse starlette text-unidecode typing-extensions urllib3 werkzeug
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # HotDAG

[![PyPI - Version](https://img.shields.io/pypi/v/hotdag.svg)](https://pypi.org/project/hotdag)
![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/nicholasyager/hotdag/test.yml?branch=main)

-----

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_id`s, a JSON list of `unique_id`s, or as an SVG of the selection.

**Table of Contents**
- [But Why Though?](#butwhythough)
- [Installation](#installation)
- [License](#license)

## 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

```console
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`

```console
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.

```console
hotdag --input file --output svg \
    --file targets/manifest.json \
    --select "resource_type:source+"
```
![graph.png](graph.png)

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

```console
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](https://spdx.org/licenses/MIT.html) license.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "hotdag",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Nicholas Yager <yager@nicholasyager.com>",
    "download_url": "https://files.pythonhosted.org/packages/2b/c3/bb15e9b699ae1baaba499a60c9289fa9a506f61ef79705a0fcf63f87b95c/hotdag-0.7.2.tar.gz",
    "platform": null,
    "description": "# HotDAG\n\n[![PyPI - Version](https://img.shields.io/pypi/v/hotdag.svg)](https://pypi.org/project/hotdag)\n![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/nicholasyager/hotdag/test.yml?branch=main)\n\n-----\n\nHotDAG is a lightweight tool that allows for testing for dbt node selectors against dbt project manifests\non a local filesystem, stored on dbt Cloud, or located remotely. Once evaluated, this selection of nodes\ncan be returned as a list of `unique_id`s, a JSON list of `unique_id`s, or as an SVG of the selection.\n\n**Table of Contents**\n- [But Why Though?](#butwhythough)\n- [Installation](#installation)\n- [License](#license)\n\n## But Why Though?\nSometimes, it can be valuable while developing locally to have a means of quickly testing a selection string against\nthe production version of a dbt project without fiddling with the generated docs site or compiling the current\nproduction branch. Instead, HotDAG lets you quickly test and visualize your selection using your project's manifest,\nwhether its on your local file system, stored remotely and accessible via URL, or hosted on dbt Cloud.\n\n## Installation\n\n```console\npip install hotdag\n```\n\n## Getting Started\nThere are a few primary ways to use HotDAG. The most common way is to load a local manifest file and list the\nselection. This is roughly equivalent to using `dbt ls`\n\n```console\nhotdag --input file --file targets/manifest.json --select \"resource_type:source+\"\n\nsource.example.example.users\nmodel.example.stg_users\nmodel.example.users\ntest.example.not_null_stg_users_id\ntest.example.unique_stg_users_id\n```\n\nHotDAG really shines, however, if you want to see a diagram of the selection.\n\n```console\nhotdag --input file --output svg \\\n    --file targets/manifest.json \\\n    --select \"resource_type:source+\"\n```\n![graph.png](graph.png)\n\nAlso of use is the ability to directly reference the latest manifest from your project's dbt Cloud\njob. For example:\n\n```console\nhotdag --input dbt_cloud --output svg \\\n    --account-id 1234 --job-id 9876 \\\n    --select \"resource_type:source+\"\n```\n\n## Roadmap\n- [ ] Styling the SVG output to better distinguish between node types.\n- [ ] Improved error handling for remote resource failures.\n- [ ] Add rational defaults (e.g. default input to `file` and `--file` to the targets directory)\n- [ ] Verify support for Selectors (as defined in yaml)\n\n## License\n\n`hotdag` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Hot evaluation of dbt DAG selectors",
    "version": "0.7.2",
    "project_urls": {
        "Documentation": "https://github.com/nicholasyager/hotdag#readme",
        "Issues": "https://github.com/nicholasyager/hotdag/issues",
        "Source": "https://github.com/nicholasyager/hotdag"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c7f5f0dc1d4ad4d30a3f3c7ee327c6cdcbed673c98d9097016c7fb7facbfcd00",
                "md5": "7fcda9666f43f44d9695273007c77c2f",
                "sha256": "43ad77850b4a777cef6780dc87bd452904ff4bbcd1a514b0560885fb6c6beb1f"
            },
            "downloads": -1,
            "filename": "hotdag-0.7.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7fcda9666f43f44d9695273007c77c2f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 12396,
            "upload_time": "2023-07-20T00:39:23",
            "upload_time_iso_8601": "2023-07-20T00:39:23.777503Z",
            "url": "https://files.pythonhosted.org/packages/c7/f5/f0dc1d4ad4d30a3f3c7ee327c6cdcbed673c98d9097016c7fb7facbfcd00/hotdag-0.7.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2bc3bb15e9b699ae1baaba499a60c9289fa9a506f61ef79705a0fcf63f87b95c",
                "md5": "744915f8e21b0738130e186c30338384",
                "sha256": "983bd0d2b2848b3d7639ce974d7b746259ae96af59dbf1ba7690342007cce7d1"
            },
            "downloads": -1,
            "filename": "hotdag-0.7.2.tar.gz",
            "has_sig": false,
            "md5_digest": "744915f8e21b0738130e186c30338384",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 59864,
            "upload_time": "2023-07-20T00:39:24",
            "upload_time_iso_8601": "2023-07-20T00:39:24.771180Z",
            "url": "https://files.pythonhosted.org/packages/2b/c3/bb15e9b699ae1baaba499a60c9289fa9a506f61ef79705a0fcf63f87b95c/hotdag-0.7.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-20 00:39:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nicholasyager",
    "github_project": "hotdag#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "agate",
            "specs": [
                [
                    "==",
                    "1.7.0"
                ]
            ]
        },
        {
            "name": "anyio",
            "specs": [
                [
                    "==",
                    "3.6.2"
                ]
            ]
        },
        {
            "name": "attrs",
            "specs": [
                [
                    "==",
                    "22.2.0"
                ]
            ]
        },
        {
            "name": "babel",
            "specs": [
                [
                    "==",
                    "2.12.1"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2022.12.7"
                ]
            ]
        },
        {
            "name": "cffi",
            "specs": [
                [
                    "==",
                    "1.15.1"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.1.0"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.3"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": [
                [
                    "==",
                    "0.4.6"
                ]
            ]
        },
        {
            "name": "dbt-core",
            "specs": [
                [
                    "==",
                    "1.5.3"
                ]
            ]
        },
        {
            "name": "dbt-extractor",
            "specs": [
                [
                    "==",
                    "0.4.1"
                ]
            ]
        },
        {
            "name": "fastapi",
            "specs": [
                [
                    "==",
                    "0.95.0"
                ]
            ]
        },
        {
            "name": "future",
            "specs": [
                [
                    "==",
                    "0.18.3"
                ]
            ]
        },
        {
            "name": "graphviz",
            "specs": [
                [
                    "==",
                    "0.20.1"
                ]
            ]
        },
        {
            "name": "hologram",
            "specs": [
                [
                    "==",
                    "0.0.15"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.4"
                ]
            ]
        },
        {
            "name": "isodate",
            "specs": [
                [
                    "==",
                    "0.6.1"
                ]
            ]
        },
        {
            "name": "jinja2",
            "specs": [
                [
                    "==",
                    "3.1.2"
                ]
            ]
        },
        {
            "name": "jsonschema",
            "specs": [
                [
                    "==",
                    "3.2.0"
                ]
            ]
        },
        {
            "name": "leather",
            "specs": [
                [
                    "==",
                    "0.3.4"
                ]
            ]
        },
        {
            "name": "logbook",
            "specs": [
                [
                    "==",
                    "1.5.3"
                ]
            ]
        },
        {
            "name": "loguru",
            "specs": [
                [
                    "==",
                    "0.6.0"
                ]
            ]
        },
        {
            "name": "markupsafe",
            "specs": [
                [
                    "==",
                    "2.1.2"
                ]
            ]
        },
        {
            "name": "mashumaro",
            "specs": [
                [
                    "==",
                    "3.6"
                ]
            ]
        },
        {
            "name": "minimal-snowplow-tracker",
            "specs": [
                [
                    "==",
                    "0.0.2"
                ]
            ]
        },
        {
            "name": "msgpack",
            "specs": [
                [
                    "==",
                    "1.0.5"
                ]
            ]
        },
        {
            "name": "networkx",
            "specs": [
                [
                    "==",
                    "2.8.8"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "23.0"
                ]
            ]
        },
        {
            "name": "parsedatetime",
            "specs": [
                [
                    "==",
                    "2.4"
                ]
            ]
        },
        {
            "name": "pathspec",
            "specs": [
                [
                    "==",
                    "0.10.3"
                ]
            ]
        },
        {
            "name": "protobuf",
            "specs": [
                [
                    "==",
                    "4.23.4"
                ]
            ]
        },
        {
            "name": "pycparser",
            "specs": [
                [
                    "==",
                    "2.21"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "==",
                    "1.10.7"
                ]
            ]
        },
        {
            "name": "pydot",
            "specs": [
                [
                    "==",
                    "1.4.2"
                ]
            ]
        },
        {
            "name": "pyparsing",
            "specs": [
                [
                    "==",
                    "3.0.9"
                ]
            ]
        },
        {
            "name": "pyrsistent",
            "specs": [
                [
                    "==",
                    "0.19.3"
                ]
            ]
        },
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.8.2"
                ]
            ]
        },
        {
            "name": "python-slugify",
            "specs": [
                [
                    "==",
                    "8.0.1"
                ]
            ]
        },
        {
            "name": "pytimeparse",
            "specs": [
                [
                    "==",
                    "1.1.8"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2023.2"
                ]
            ]
        },
        {
            "name": "pyyaml",
            "specs": [
                [
                    "==",
                    "6.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.28.2"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "sniffio",
            "specs": [
                [
                    "==",
                    "1.3.0"
                ]
            ]
        },
        {
            "name": "sqlparse",
            "specs": [
                [
                    "==",
                    "0.4.3"
                ]
            ]
        },
        {
            "name": "starlette",
            "specs": [
                [
                    "==",
                    "0.26.1"
                ]
            ]
        },
        {
            "name": "text-unidecode",
            "specs": [
                [
                    "==",
                    "1.3"
                ]
            ]
        },
        {
            "name": "typing-extensions",
            "specs": [
                [
                    "==",
                    "4.5.0"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "1.26.15"
                ]
            ]
        },
        {
            "name": "werkzeug",
            "specs": [
                [
                    "==",
                    "2.2.3"
                ]
            ]
        }
    ],
    "lcname": "hotdag"
}
        
Elapsed time: 0.25168s