Giter Site home page Giter Site logo

octoenergy / oliver-twist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from autotraderuk/oliver-twist

0.0 2.0 0.0 1.99 MB

dbt DAG Auditor

Home Page: https://olivertwi.st

License: Apache License 2.0

Python 95.27% HTML 3.55% CSS 0.16% Jinja 1.01%

oliver-twist's Introduction

Alt text

oliver-twist

DAG Auditor

Build status badge Code style: black PyPI PyPI - Python Version GitHub - License

oliver-twist is a dag auditing tool that audits the DBT DAG and generates a summary report. There is a docs site, including descriptions of all currently implemented rules.

please sir, can I automate my DAG auditing

Getting Started

To get started, install the package

$ pip install olivertwist

and then run it by passing it your dbt manifest JSON

olivertwist check manifest.json

This will report any failures to the console, and also in HTML format in a directory called target. You can optionally auto-open the report in a browser with:

olivertwist check manifest.json --browser

You can also tell Oliver to load and run your own custom rules using the --add-rules-from option. See documentation for full details.

Full options are available with:

olivertwist check --help

Configuration

All rules are enabled by default. To change this you need a configuration file called olivertwist.yml in the same directory you are running olivertwist. An example configuration is shown below:

version: '1.0'
universal:
  - id: no-rejoin-models
    enabled: false
  - id: no-disabled-models
    enabled: true

There is a command to help you generate the config automatically:

olivertwist config

This will show all the available rules and allow you to toggle the ones that you want to enforce.

Local Development

Clone this repo and install the project:

poetry install

Install pre-commit hooks for linting

This is optional, but highly recommended to avoid annoying linting failure in CI.

poetry run pre-commit install

To run the pre-commit hooks locally:

poetry run pre-commit run

To get the latest versions of the dependencies and to update the poetry.lock file run:

poetry update

To run oliver-twist and generate the summary report run:

poetry run olivertwist example_manifest.json

Working with diagrams

To update and regenerate the images that illustrate rule failures in the documentation follow the next steps:

  • update the diagrams using the mermaid syntax
  • install yarn
  • cd docs/diagrams
  • ./generate.sh
  • inspect the generated images in ./docs/diagrams/output/
  • if you're happy with the results, run ./copy.sh so that they are copied over to ./docs/images
  • you can now reference those images. e.g. in .docs/rules.md

Creating a distribution

poetry build --format wheel

oliver-twist's People

Contributors

bloomonkey avatar georgim0 avatar j0nnyr0berts avatar jelstongreen avatar samwedge avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.