Skip to content

pysparky_data_quality.rules

Factories for reusable, lazy PySpark row-rule expressions.

Functions

NameDescription
betweenCreate an inclusive lower/upper-bound rule for a PySpark column.
not_nullCreate a rule that fails when the named column is SQL NULL.

betweenfunction#

def between(column: str | Column, lower: Any, upper: Any, *, name: str | None = None, null_policy: NullPolicy = 'fail') -> ValidationRule

Create an inclusive lower/upper-bound rule for a PySpark column.

NULL input produces a SQL NULL condition. The default policy treats that result as a failure; null_policy="pass" explicitly allows it.

not_nullfunction#

def not_null(column: str | Column, *, name: str | None = None) -> ValidationRule

Create a rule that fails when the named column is SQL NULL.

String column references receive a stable default rule name. A Column expression requires an explicit name because its source column cannot be inferred through a public PySpark API.