sparkdq.exceptions#
- exception CheckConfigurationError[source]
Bases:
Exception
Base exception for static configuration validation errors.
Represents configuration issues that can be detected during check definition or setup, independent of any specific dataset. These errors indicate fundamental problems with check parameters, logical inconsistencies, or missing required configuration elements.
- exception InvalidCheckConfigurationError[source]
Bases:
CheckConfigurationError
Exception raised for logically inconsistent check configurations.
Represents configuration errors where individual parameters are valid but their combination creates logical contradictions or impossible conditions. These errors are typically detected during static configuration validation before any data processing begins.
- exception InvalidSQLExpressionError(expression: str, error_message: str)[source]
Bases:
RuntimeCheckConfigurationError
Exception raised for invalid or unsafe SQL expressions in check configurations.
Indicates that a SQL expression provided to a check cannot be parsed or executed safely by PySpark, either due to syntax errors, semantic issues, or security concerns. This validation prevents potentially dangerous or malformed expressions from being executed against datasets.
- exception InvalidSeverityLevelError(value: str)[source]
Bases:
CheckConfigurationError
Exception raised for unrecognized severity level specifications.
Indicates that a severity value provided through configuration sources does not match any of the defined severity levels in the framework. This error ensures that only valid severity classifications are accepted, maintaining consistency in failure handling behavior.
- exception MissingCheckSetError[source]
Bases:
RuntimeCheckConfigurationError
Exception raised when attempting to execute validation without configured checks.
Indicates that the validation engine was invoked without a properly assigned CheckSet, representing a programming error in the validation setup sequence. This error prevents execution attempts on improperly initialized engines.
- exception MissingCheckTypeError[source]
Bases:
CheckConfigurationError
Exception raised when check configuration lacks the required type identifier.
Indicates that a configuration dictionary is missing the mandatory ‘check’ field that specifies which check implementation should be instantiated. This error prevents the CheckFactory from resolving the appropriate check type during configuration processing.
- exception MissingColumnError(column: str, available: list[str])[source]
Bases:
RuntimeCheckConfigurationError
Exception raised when a check references a non-existent column.
Indicates a mismatch between the check configuration and the actual dataset schema, where the check expects a column that is not present in the target DataFrame. This typically suggests either incorrect check configuration or unexpected changes in the data schema.
- exception MissingReferenceDatasetError(name: str)[source]
Bases:
RuntimeCheckConfigurationError
Exception raised when a check requests an unavailable reference dataset.
Indicates that a check requiring external reference data cannot locate the specified dataset in the current validation context, suggesting either missing reference data injection or incorrect dataset naming.
- exception RuntimeCheckConfigurationError[source]
Bases:
Exception
Base exception for configuration errors detected during check execution.
Represents configuration issues that can only be identified when checks are applied to actual datasets, such as column references that don’t exist in the target data or invalid data type assumptions. These errors indicate mismatches between check configuration and runtime data characteristics.