Skip to main content
GuideServerConfigure and deploy Tabsdata servers on your machine.TutorialsConfigure data integration workflows within a running Tabsdata server.Advanced TutorialsBuild end-to-end workflows between two specific systems.API ReferenceCLI ReferenceRelease Notes
Version: 2.0.0

MatchClassifier

class
class MatchClassifier(
column_names: ColumnNamesWithAltSpec | None = None,
on_missing_column: OnInvalidColumnSpec = 'ignore',
on_wrong_type: OnInvalidColumnSpec = 'ignore',
pattern: str = field(kw_only=True),
tags: TagsSpec | None = field(default=None, kw_only=True),
on_wrong_value: OnInvalidValueSpec = 'ignore',
)

Bases: BoolClassifier, ABC

Categories: dq-classifier

A boolean classifier that checks if a value matches a regex pattern.

Examples

The concrete pattern classifiers are Matches and DoesNotMatch:

Matches(["email"], pattern=r".+@.+")
DoesNotMatch(["email"], pattern=r"^tmp-")

Parameters

parameter
column_namesColumnNamesWithAltSpec | None (list[str | tuple[str, str | None]] | None)

Columns to classify. Each entry is a column name, or a (column, verdict_column) tuple naming the column the verdict lands in; the two forms can be mixed. None (the default) classifies every user column, skipping the types this classifier does not support (see on_wrong_type). A verdict column that is not named explicitly is the source column plus this classifier's suffix.

parameter
on_missing_columnOnInvalidColumnSpec (Literal['ignore', 'fail'])

What to do when a named column is not in the table: "ignore" (the default) leaves it out, "fail" aborts the check.

parameter
on_wrong_typeOnInvalidColumnSpec (Literal['ignore', 'fail'])

What to do when a column's data type is not one this classifier supports: "ignore" (the default) leaves it out, "fail" aborts the check.

parameter
patternstr

Regular expression matched against each value.

parameter
tagsTagsSpec | None (list[str] | None)

Optional labels for this classifier. An operator given the same tag applies only to the classifiers carrying it; untagged operators apply to all of them.

parameter
on_wrong_valueOnInvalidValueSpec (Literal['ignore', 'fail'])

Fixed to "ignore": this classifier takes no value to compare against, so there is no wrong value to report.

Methods

method
supported_dtypes
def supported_dtypes() -> frozenset