Skip to main content

Kedro Great

As Seen on DataEngineerOne
Watch the Video: Kedro Great: Use Great Expectations with Ease!

Kedro Great is an easy-to-use plugin for kedro that makes integration with Great Expectations fast and simple.

Hold yourself accountable to Great Expectations.
Never have fear of data silently changing ever again.

Quick Start

Install

Kedro Great is available on pypi, and is installed with kedro hooks.

pip install kedro-great

Setup

Once installed, kedro great becomes available as a kedro command.

You can use kedro great init to initialize a Great Expectations project, and then automatically generate its project context.

Furthermore, by using kedro great init, you also generate Great Expectations Datasources and Suites to use with your catalog.yml DataSets.

By default, expectation suites are named for the catalog.yml name and a basic.json is generated for each.

kedro great init

Use

After the Great Expectations project has been setup and configured, you can now use the KedroGreat hook to run all your data validations every time the pipeline runs.

# run.py
from kedro_great import KedroGreat

class ProjectContext(KedroContext):
    hooks = (
        KedroGreat(),
    )

Then just run the kedro pipeline to run the suites.

kedro run

Results

Finally, you can use great_expectations itself to generate documentation and view the results of your pipeline.

Love seeing those green ticks!

great_expectations docs build

Hook Options

The KedroGreat hook supports a few options currently. If you wish to

expectations_map: Dict[str, Union[str, List[str]]]

If you have multiple expectation suites you wish to run, or expectation suites that do not have the same name as the catalog dataset, these mappings can be specified in the expectations_map argument for KedroGreat

Default: The catalog name is the expectation name.

Note: Specifying a suite type such as .basic will override all other suite types

KedroGreat(expectations_map={
    'pandas_iris_data': 'pandas_iris_data',
    'spark_iris_data': ['spark_iris_data',
                        'other_expectation',
                        'another_expectation.basic'],

})

suite_types: List[Optional[str]]

If your suites have multiple types, you can choose exactly which types to run.

A None means that a suite will not have the type appended to the name.

Default: The KedroGreat.DEFAULT_SUITE_TYPES.

Node: If a suite type is already specified in the expectations_map, that will override this list.

KedroGreat(suite_types=[
    'warning',
    'basic',
    None
])

run_before_node:bool, run_after_node: bool

You can decide when the suites run, before or after a node or both before and after a node.

It will operate on the node inputs and outputs respectively.

Default: Only runs before a node runs.

KedroGreat(run_before_node=True, run_after_node=False)

fail_fast: bool, fail_after_pipeline_run: bool

You can also have KedroGreat throw a SuiteValidationFailure when a Great Expectations validation fails.

Either the exception can be throw immediately, or the exceptions can be aggregated over the whole pipeline run, and thrown at the end.

This is useful for when you wish to run validation on your pipeline in a CI/CD way.

Default: Neither are set

KedroGreat(fail_fast=True, fail_after_pipeline_run=True)

Release files for kedro-great 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kedro-great 0.2.7
File Size Uploaded
kedro-great-0.2.7.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kedro-great 0.2.7
File Interpreter ABI Platform
kedro_great-0.2.7-py3-none-any.whl Python 3 none any Details

Total release size: 22.4 kB

Release files / kedro-great-0.2.7.tar.gz

Download URL kedro-great-0.2.7.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e0aa47af119d10a3459e2b4a8cc9b1cf44a690a8eec6e50ad65842ed2400fee6
BLAKE2b-256 checksum
How to use checksums
723e6a238d7e79abe1c0967b18b422a7800d7fec874f4b3a3efcf41efeb244e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6

Release files / kedro_great-0.2.7-py3-none-any.whl

Download URL kedro_great-0.2.7-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4dc78a652728d5803faf0a0502290c504602209f974c20a2b695dcbe97a4def5
BLAKE2b-256 checksum
How to use checksums
295cb7938b4ad9000c63add0c47891aae3cf405a41b2e26ffd6ce59fde723f7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6

Release history Release notifications | RSS feed

This release

0.2.7 This release

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page