dbldatagen.constraints.literal_range_constraint module
This module defines the ScalarRange class
- class LiteralRange(columns, lowValue, highValue, strict=False)[source]
Bases:
NoPrepareTransformMixin
,Constraint
LiteralRange Constraint object - validates that column value(s) are between 2 literal values
- Parameters:
columns – Name of column or list of column names
lowValue – Tests that columns have values greater than low value (greater or equal if strict is False)
highValue – Tests that columns have values less than high value (less or equal if strict is False)
strict – If True, excludes low and high values from range. Defaults to False
Note lowValue and highValue must be values that can be converted to a literal expression using the pyspark.sql.functions.lit function