Skip to content

DataQualityCheck

laktory.models.DataQualityCheck ¤

Bases: BaseModel

A Data Quality Check is the result of an expectation compared to a dataset.

ATTRIBUTE DESCRIPTION
fails_count

Number of rows not meeting the expectation.

TYPE: int

rows_count

Total number of rows in dataset.

TYPE: int

status

Result of comparison, considering the expectation criteria and tolerances.

TYPE: Literal['PASS', 'FAIL']

Examples:

from laktory import models

check = models.DataQualityCheck(
    rows_count=10,
    fails_count=2,
    status="FAIL",
)
print(check)
# > variables={} fails_count=2 rows_count=10 status='FAIL'

check = models.DataQualityCheck(
    rows_count=10,
    fails_count=2,
    status="PASS",
)
print(check)
# > variables={} fails_count=2 rows_count=10 status='PASS'
ATTRIBUTE DESCRIPTION
failure_rate

Ratio of the number of rows not meeting the expectation to the total number of rows in the dataframe. Returns

Attributes¤

failure_rate property ¤

failure_rate

Ratio of the number of rows not meeting the expectation to the total number of rows in the dataframe. Returns None when the type is "AGGREGATE".