Classifier
class Classifier
Bases: ABC, JsonSerde
Categories: dq-classifier
Abstract base class for all data quality classifiers.
A classifier evaluates one or more columns and writes a per-row verdict
into a new column. Collect classifiers in a DataQuality action
(classifiers=[...]) alongside the operators that act on their
verdicts. Concrete classifiers are frozen; build one per rule.
Concrete classifiers share these construction fields (a few fix
on_wrong_type / on_wrong_value and do not expose them):
Examples
Classifiers are the labelling half of a check; pass concrete ones to
DataQuality(classifiers=[...]):
DataQuality(
table="checked",
classifiers=[IsNotNull(["customer_id"]), IsPositive(["amount"])],
operators=[Enrich()],
)
Methods
method
supported_dtypesdef supported_dtypes() -> frozenset
Returns the set of data types supported by this classifier.