Skip to main content

Kedro Great makes integrating Great Expectations with Kedro easy!

Project description

Kedro Great

As Seen on DataEngineerOne

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kedro-great-0.1.8.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kedro_great-0.1.8-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file kedro-great-0.1.8.tar.gz.

File metadata

  • Download URL: kedro-great-0.1.8.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for kedro-great-0.1.8.tar.gz
Algorithm Hash digest
SHA256 a25b9f9da4af9bf172e2f25dbf848da7b0ee7331d12129767a8208f5e90c5eb0
MD5 e36554b5037b4f8e5611ad23f10960b4
BLAKE2b-256 90f38f1ae05127eec0a32bf1946a32c9bce33755e720b9b1268e7ee2ea2f22ff

See more details on using hashes here.

File details

Details for the file kedro_great-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: kedro_great-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for kedro_great-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 fa8ecf8485d59249c33142e8cc2277ae88965581d2e996fc52a84f982400c18e
MD5 c54234d6c1505b216a9f267eb28be10f
BLAKE2b-256 313dc3aecece28a36ac32ceaacd47dd71bef58cbff88c0dd3ac7de7e6d690c2a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page