Giter Site home page Giter Site logo

bruno-uy / dbt-data-quality Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 15 KB

Data quality checks in your dbt flow

Home Page: https://dataqualityguru.substack.com/

License: MIT License

Jupyter Notebook 100.00%
data data-quality dbt dbt-packages dbt-tests

dbt-data-quality's Introduction

dbt-data-quality

Data quality checks in your dbt flow.

This repository helps you understand the different data quality checks available in dbt.

You can clone the repository, create a supabase account, write the .env file and run the commands according to the environment setup, and get an environment where you can practice testing with dbt for free.

Author

I'm Bruno Gonzalez from πŸ‡ΊπŸ‡Ύ, working as a senior data engineer, and writing about data quality and data engineering.

Tools

Postgres database: supabase. Create a free account and get the credentials to create the .env file.

Environment setup

Create .env file with the following structure:

POSTGRES_HOST=<postgres_host>
POSTGRES_USER=<postgres_user>
POSTGRES_PASSWORD=<postgres_password>
POSTGRES_DATABASE=<postgres_database>

Commands to setup the environment:

conda create -n dbtdq python=3.9
conda activate dbtdq
pip install -r requirements.txt
export $(cat .env | xargs)
dbt seed
dbt run
dbt deps

Example

Modified from dbt-labs jaffle_shop.

Changes:

  • seeds/raw_customers.csv
    • Added customer 101 without first_name.
    • Added customer 102 without last_name.
    • Added customer 103 with a different last_name pattern.
    • Added customer 104 with inconsistent case in first_name.
  • seeds/raw_orders.csv
    • Duplicated order with id = 98
    • Added order 100 with an order_date in the future.
    • Added order 101 with an inexistent user_id.
    • Added order 102 with a wrong status.
    • Added order 103 without issues.
  • seeds/raw_payments.csv
    • Added payment 114 for order 100 with a wrong payment_method.
    • Added payment 115 for order 103 with a huge amount (outlier).

dbt-data-quality's People

Contributors

bruno-uy avatar

Watchers

 avatar

Forkers

bmaggard

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.