Classes¶
spark_expectations.notifications.push.spark_expectations_notify.SparkExpectationsNotify
dataclass
¶
This class implements Notification
Attributes¶
product_id: str
instance-attribute
¶
Functions¶
construct_message_for_each_rules(rule_name: str, failed_row_count: int, error_drop_percentage: float, set_error_drop_threshold: float, action: str) -> str
¶
This function supports constructing the notification message when rule threshold exceeds certain threshold Args: rule_name: name of the dq rule failed_row_count: number of failed of dq rule error_drop_percentage: error drop percentage Returns: str
Source code in spark_expectations/notifications/push/spark_expectations_notify.py
notify_on_completion() -> None
¶
This function sends notification on completion of spark expectations project
Source code in spark_expectations/notifications/push/spark_expectations_notify.py
notify_on_exceeds_of_error_threshold() -> None
¶
This function sends notification on completion of spark expectations project
Source code in spark_expectations/notifications/push/spark_expectations_notify.py
notify_on_exceeds_of_error_threshold_each_rules(message: str) -> None
¶
This function sends notification when specific rule error drop percentage exceeds above threshold
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rule_name |
name of the dq rule |
required | |
failed_row_count |
number of failed of dq rule |
required | |
error_drop_percentage |
error drop percentage |
required |
Source code in spark_expectations/notifications/push/spark_expectations_notify.py
notify_on_failure(_error: str) -> None
¶
This function sends notification on failure of spark expectations project
Parameters:
Name | Type | Description | Default |
---|---|---|---|
_error |
str
|
message or exception for the failure(str) |
required |
Source code in spark_expectations/notifications/push/spark_expectations_notify.py
notify_on_start() -> None
¶
This function sends notification on start of spark expectations project
Source code in spark_expectations/notifications/push/spark_expectations_notify.py
notify_on_start_completion_failure(_on_start: Any, _on_completion: Any, _on_failure: Any) -> Any
¶
This function orchestrate notification
Parameters:
Name | Type | Description | Default |
---|---|---|---|
_on_start |
Any
|
function to send notification on start of spark expectations |
required |
_on_completion |
Any
|
function to send notification on completion of spark expectations |
required |
_on_failure |
Any
|
function to send notification on failure |
required |
Source code in spark_expectations/notifications/push/spark_expectations_notify.py
notify_rules_exceeds_threshold(rules: dict) -> None
¶
This functions identifies error drop percentage for rules which exceeds above set threshold
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rules |
dict
|
lsit of rules which set to do data quality checks |
required |
Returns:
Type | Description |
---|---|
None
|
None |