Skip to content

References

Ivan Zhang edited this page Aug 27, 2023 · 6 revisions

Subclassing from the Base Check

The base Check class (data_checks/base/check.py) define methods used to initialize, customize, and execute a check and its rules. It also has methods to store data related to the check and its execution as well as interact with its suite (if any). It is not recommended to directly subclass the Check class unless you have a specific use case that requires it. Instead, use the DataCheck class (data_checks/data_check.py) which is a simplified and beginner friendly subclass of the Check class.

If you truly want to modify the base Check class, you can do so by subclassing it and overriding its methods. However be ‼️ extremely careful ‼️ when doing so as it may break the functionality of the library. If you do so, make sure to test your check thoroughly.

⚠️WARNING
Documentation for the base Check class is limited and still a work in progress. For now, you can refer to the source code and its corresponding docstrings for more information.

Subclassing from the Base Suite

The base Suite class (data_checks/base/suite.py) define methods used to initialize, customize, and execute a suite and its checks. It also has methods to store data related to the suite and its execution as well as interact with its checks. It is not recommended to directly subclass the Suite class unless you have a specific use case that requires it. Instead, use the DataSuite class (data_checks/data_suite.py) which is a simplified and beginner friendly subclass of the Suite class.

If you truly want to modify the base Suite class, you can do so by subclassing it and overriding its methods. However be ‼️ extremely careful ‼️ when doing so as it may break the functionality of the library. If you do so, make sure to test your suite thoroughly.

⚠️WARNING
Documentation for the base Suite class is limited and still a work in progress. For now, you can refer to the source code and its corresponding docstrings for more information.

Architecture

This library defines 3 core concepts: suites, checks, and rules. Suites are a collection of checks and/or rules. Checks are groups of organized rules that can be selectively executed. Rule are the atomic unit of this data check library and are functions that check incoming data. In the current version, rules need to be defined within checks. This will be changed in a later version of the library. Rules are the fundamental building block of data checks — every other component in this library is built on top of rules and adds additional functionality around these rules. Furthermore note that a Dataset simplifies how data moves between checks and when defined in a suite can be accessed by its corresponding checks and their rules.

Hierarchy

Suites are top level components that group checks. A dataset can be attached to a suite so that the same dataset can be accessed by the underlying checks and rules. Checks are second level components that contain rules. Rules are the lowest level components that actually check data. The following diagram shows the hierarchy of these components:

Data Checks Overview

Execution Flow

The execution flow of a suite of data checks proceeds as follows:

Execution Order

Clone this wiki locally