MicrosoftTeamsNotificationAction
class great_expectations.checkpoint.MicrosoftTeamsNotificationAction(*, type: Literal['microsoft'] = 'microsoft', notify_on: Literal['all', 'failure', 'success'] = 'all', teams_webhook: str, renderer: great_expectations.render.renderer.microsoft_teams_renderer.MicrosoftTeamsRenderer = None)#
Sends a Microsoft Teams notification to a given webhook.
- name: send_microsoft_teams_notification_on_validation_result
action:
class_name: MicrosoftTeamsNotificationAction
# put the actual webhook URL in the uncommitted/config_variables.yml file
# or pass in as environment variable
microsoft_teams_webhook: ${validation_notification_microsoft_teams_webhook}
notify_on: all
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.microsoft_teams_renderer
class_name: MicrosoftTeamsRenderer- Parameters:
renderer – Specifies the renderer used to generate a query consumable by teams API, e.g.:
{
"module_name": "great_expectations.render.renderer.microsoft_teams_renderer",
"class_name": "MicrosoftTeamsRenderer",
}:param microsoft_teams_webhook: Incoming Microsoft Teams webhook to which to send notifications. :param notify_on: Specifies validation status that triggers notification. One of "all", "failure", "success".
run(validation_result_suite: ExpectationSuiteValidationResult, validation_result_suite_identifier: Union[ValidationResultIdentifier, GXCloudIdentifier], expectation_suite_identifier: Optional[ExpectationSuiteIdentifier] = None, checkpoint_identifier=None, **kwargs)#
Public entrypoint GX uses to trigger a ValidationAction.
When a ValidationAction is configured in a Checkpoint, this method gets called after the Checkpoint produces an ExpectationSuiteValidationResult.
- Parameters:
validation_result_suite – An instance of the ExpectationSuiteValidationResult class.
validation_result_suite_identifier – an instance of either the ValidationResultIdentifier class (for open source Great Expectations) or the GXCloudIdentifier (from Great Expectations Cloud).
expectation_suite_identifier – Optionally, an instance of the ExpectationSuiteIdentifier class.
checkpoint_identifier – Optionally, an Identifier for the Checkpoint.
kwargs – named parameters that are specific to a given Action, and need to be assigned a value in the Action's configuration in a Checkpoint's action_list.
- Returns:
A Dict describing the result of the Action.