Giter Site home page Giter Site logo

bbakersmith / soda-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sodadata/soda-core

0.0 1.0 0.0 895 KB

Data reliability tools for SQL- and Spark-accessible data

Home Page: https://docs.soda.io/soda-core/overview.html

License: Apache License 2.0

Shell 0.34% Python 99.11% ANTLR 0.37% Dockerfile 0.17%

soda-core's Introduction

๐Ÿ“ฃ Tuesday, June 28: ๐Ÿ“ฃ After months of hard work, Soda Core + SodaCL are now generally available! ๐ŸŽ‰ ๐ŸŽ‰ Check out the Release notes for details.


Soda Core

Data reliability testing for SQL- and Spark- accesssible data.

License: Apache 2.0 Slack


โœ” An open-source, CLI tool and Python library for data reliability
โœ” Compatible with Soda Checks Language (SodaCL) and Soda Cloud
โœ” Enables data quality testing both in and out of your pipeline, for data observability, and for data monitoring
โœ” Integrated to allow a Soda scan in a data pipeline, or programmatic scans on a time-based schedule

Soda Core is a free, open-source, command-line tool that enables you to use the Soda Checks Language to turn user-defined input into aggregated SQL queries.

When it runs a scan on a dataset, Soda Core executes the checks to find invalid, missing, or unexpected data. When your Soda Checks fail, they surface the data that you defined as โ€œbadโ€.

Get started

Soda Core currently supports Amazon Athena, Amazon Redshift, GCP BigQuery, PostgreSQL, Snowflake, and Spark.

Requirements

  • Python 3.8 or greater
  • Pip 21.0 or greater
  1. To get started, use the install command, replacing soda-core-postgres with the package that matches your data source. See Install Soda Core.
    pip install soda-core-postgres
  • soda-core-athena
  • soda-core-bigquery
  • soda-core-postgres
  • soda-core-redshift
  • soda-core-snowflake
  • soda-core-spark-df
  1. Prepare a configuration.yml file to connect to your data source. Then, write data quality checks in a checks.yml file. See Configure Soda Core.
  2. Run a scan to review checks that passed, failed, or warned during a scan. See Run a Soda Core scan. soda scan -d your_datasource -c configuration.yml checks.yml

Example checks

# Checks for basic validations
checks for dim_customer:
  - row_count between 10 and 1000
  - missing_count(birth_date) = 0
  - invalid_percent(phone) < 1 %:
      valid format: phone number
  - invalid_count(number_cars_owned) = 0:
      valid min: 1
      valid max: 6
  - duplicate_count(phone) = 0

# Checks for schema changes
checks for dim_product:
  - schema:
      name: Find forbidden, missing, or wrong type
      warn:
        when required column missing: [dealer_price, list_price]
        when forbidden column present: [credit_card]
        when wrong column type:
          standard_cost: money
      fail:
        when forbidden column present: [pii*]
        when wrong column index:
          model_name: 22
# Check for freshness 
  - freshness(start_date) < 1d

# Check for referential integrity
checks for dim_department_group:
  - values in (department_group_name) must exist in dim_employee (department_name)

Documentation

soda-core's People

Contributors

m1n0 avatar vijaykiran avatar tombaeyens avatar bastienboutonnet avatar baturayo avatar tituskx avatar janet-can avatar pre-commit-ci[bot] avatar duyet avatar stuart-robinson avatar

Watchers

James Cloos 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.