Skip to main content
Version: 1.3.7

SlackNotificationAction

Signature

class great_expectations.checkpoint.SlackNotificationAction(*, type: Literal['slack'] = 'slack', name: str, slack_webhook: Optional[Union[great_expectations.datasource.fluent.config_str.ConfigStr, str]] = None, slack_token: Optional[Union[great_expectations.datasource.fluent.config_str.ConfigStr, str]] = None, slack_channel: Optional[Union[great_expectations.datasource.fluent.config_str.ConfigStr, str]] = None, notify_on: Literal['all', 'failure', 'success'] = 'all', notify_with: Optional[List[str]] = None, show_failed_expectations: bool = False, renderer: great_expectations.render.renderer.slack_renderer.SlackRenderer = None)

Sends a Slack notification to a given webhook.

- name: send_slack_notification_on_validation_result
action:
class_name: SlackNotificationAction
# put the actual webhook URL in the uncommitted/config_variables.yml file
# or pass in as environment variable
# use slack_webhook when not using slack bot token
slack_webhook: ${validation_notification_slack_webhook}
slack_token:
slack_channel:
notify_on: all
notify_with:
renderer:
# the class that implements the message to be sent
# this is the default implementation, but you can
# implement a custom one
module_name: great_expectations.render.renderer.slack_renderer
class_name: SlackRenderer
show_failed_expectations: True

Examples

renderer:

    {
"module_name": "great_expectations.render.renderer.slack_renderer",
"class_name": "SlackRenderer",
}

Parameters

NameDescription

renderer

Specifies the Renderer used to generate a query consumable by Slack API.