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

IsBetween

class
class IsBetween(
column_names: ColumnNamesWithAltSpec | None = None,
min_val: RangeValueSpec | None = None,
max_val: RangeValueSpec | None = None,
closed_on: RangeClosedOnSpec = 'both',
on_missing_column: OnInvalidColumnSpec = 'ignore',
on_wrong_type: OnInvalidColumnSpec = 'ignore',
on_wrong_value: OnInvalidValueSpec = 'ignore',
tags: TagsSpec | None = field(default=None, kw_only=True),
)

Bases: BetweenClassifier

Categories: dq-classifier

A boolean classifier that checks whether a value is inside a range. Applies to non-boolean columns.

Examples

IsBetween(["value"], min_val=0.0, max_val=10.0, closed_on="both")

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 (a column amount lands in amount_is_between).

parameter
min_valRangeValueSpec | None (int | float | bool | str | date | time | datetime | timedelta | bytes | Decimal | None)

Lower bound; None leaves the low side unbounded.

parameter
max_valRangeValueSpec | None (int | float | bool | str | date | time | datetime | timedelta | bytes | Decimal | None)

Upper bound; None leaves the high side unbounded. When both are given they must be the same type and min_val must not exceed max_val.

parameter
closed_onRangeClosedOnSpec (Literal['none', 'lower', 'upper', 'both'])

Which bounds are inclusive: "none", "lower", "upper" or "both" (default "both").

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
on_wrong_valueOnInvalidValueSpec (Literal['ignore', 'fail'])

What to do when a value cannot be evaluated against this classifier: "ignore" (the default) yields a null verdict, "fail" aborts the check.

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.

Methods

method
to_dict
def to_dict() -> dict[str, Any]

method
to_json
def to_json(indent: int | None = None) -> str

Parameters:

parameter
indentint | None

method
from_dict
def from_dict(d: dict[str, Any]) -> Any

Parameters:

parameter

method
from_json
def from_json(s: str | bytes) -> Any

Parameters:

parameter

method
supported_dtypes
def supported_dtypes() -> frozenset