Skip to main content
Version: 0.15.50

SNSNotificationAction

class great_expectations.checkpoint.SNSNotificationAction(data_context: DataContext, sns_topic_arn: str, sns_message_subject: Optional[str])#

Action that pushes validations results to an SNS topic with a subject of passed or failed.

YAML configuration example:

    - name: send_sns_notification_on_validation_result
action:
class_name: SNSNotificationAction
# put the actual SNS Arn in the uncommitted/config_variables.yml file
# or pass in as environment variable
data_context:
sns_topic_arn:
sns_subject:

Parameters
  • data_context – Data Context that is used by the Action.

  • sns_topic_arn – The SNS Arn to publish messages to.

  • sns_subject – Optional. The SNS Message Subject - defaults to expectation_suite_identifier.expectation_suite_name.

run(validation_result_suite: great_expectations.core.expectation_validation_result.ExpectationSuiteValidationResult, validation_result_suite_identifier: Union[great_expectations.data_context.types.resource_identifiers.ValidationResultIdentifier, great_expectations.data_context.types.resource_identifiers.GXCloudIdentifier], data_asset, expectation_suite_identifier: Optional[great_expectations.data_context.types.resource_identifiers.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).

  • data_asset – An instance of the Validator class.

  • 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.