SlackNotificationAction
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: TrueExamples
renderer:
{
"module_name": "great_expectations.render.renderer.slack_renderer",
"class_name": "SlackRenderer",
}Parameters
Name Description renderer
Specifies the Renderer used to generate a query consumable by Slack API.
slack_webhook
The incoming Slack webhook to which to send notification.
slack_token
Token from Slack app. Used when not using slack_webhook.
slack_channel
Slack channel to receive notification. Used when not using slack_webhook.
notify_on
Specifies validation status that triggers notification. One of "all", "failure", "success".
notify_with
List of DataDocs site names to display in Slack messages. Defaults to all.
show_failed_expectations
Shows a list of failed expectation types.
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
)