def validate(self, expectation_suite=None, run_id=None, data_context=None, evaluation_parameters=None, catch_exceptions=True, result_format=None, only_return_failures=False, run_name=None, run_time=None):
    'Generates a JSON-formatted report describing the outcome of all expectations.\n\n        Use the default expectation_suite=None to validate the expectations config associated with the DataAsset.\n\n        Args:\n            expectation_suite (json or None):                 If None, uses the expectations config generated with the DataAsset during the current session.                 If a JSON file, validates those expectations.\n            run_name (str):                 Used to identify this validation result as part of a collection of validations.                 See DataContext for more information.\n            data_context (DataContext):                 A datacontext object to use as part of validation for binding evaluation parameters and                 registering validation results.\n            evaluation_parameters (dict or None):                 If None, uses the evaluation_paramters from the expectation_suite provided or as part of the                 data_asset. If a dict, uses the evaluation parameters in the dictionary.\n            catch_exceptions (boolean):                 If True, exceptions raised by tests will not end validation and will be described in the returned                 report.\n            result_format (string or None):                 If None, uses the default value (\'BASIC\' or as specified).                 If string, the returned expectation output follows the specified format (\'BOOLEAN_ONLY\',\'BASIC\',                 etc.).\n            only_return_failures (boolean):                 If True, expectation results are only returned when ``success = False`` \n        Returns:\n            A JSON-formatted dictionary containing a list of the validation results.             An example of the returned format::\n\n            {\n              "results": [\n                {\n                  "unexpected_list": [unexpected_value_1, unexpected_value_2],\n                  "expectation_type": "expect_*",\n                  "kwargs": {\n                    "column": "Column_Name",\n                    "output_format": "SUMMARY"\n                  },\n                  "success": true,\n                  "raised_exception: false.\n                  "exception_traceback": null\n                },\n                {\n                  ... (Second expectation results)\n                },\n                ... (More expectations results)\n              ],\n              "success": true,\n              "statistics": {\n                "evaluated_expectations": n,\n                "successful_expectations": m,\n                "unsuccessful_expectations": n - m,\n                "success_percent": m / n\n              }\n            }\n\n        Notes:\n           If the configuration object was built with a different version of great expectations then the            current environment. If no version was found in the configuration file.\n\n        Raises:\n           AttributeError - if \'catch_exceptions\'=None and an expectation throws an AttributeError\n        '
    try:
        validation_time = datetime.datetime.now(datetime.timezone.utc).strftime('%Y%m%dT%H%M%S.%fZ')
        assert ((not (run_id and run_name)) and (not (run_id and run_time))), 'Please provide either a run_id or run_name and/or run_time.'
        if (isinstance(run_id, str) and (not run_name)):
            warnings.warn('String run_ids will be deprecated in the future. Please provide a run_id of type RunIdentifier(run_name=None, run_time=None), or a dictionary containing run_name and run_time (both optional). Instead of providing a run_id, you may also providerun_name and run_time separately.', DeprecationWarning)
            try:
                run_time = parse(run_id)
            except (ValueError, TypeError):
                pass
            run_id = RunIdentifier(run_name=run_id, run_time=run_time)
        elif isinstance(run_id, dict):
            run_id = RunIdentifier(**run_id)
        elif (not isinstance(run_id, RunIdentifier)):
            run_id = RunIdentifier(run_name=run_name, run_time=run_time)
        self._active_validation = True
        validate__data_context = self._data_context
        if ((data_context is None) and (self._data_context is not None)):
            data_context = self._data_context
        elif (data_context is not None):
            self._data_context = data_context
        results = []
        if (expectation_suite is None):
            expectation_suite = self.get_expectation_suite(discard_failed_expectations=False, discard_result_format_kwargs=False, discard_include_config_kwargs=False, discard_catch_exceptions_kwargs=False)
        elif isinstance(expectation_suite, str):
            try:
                with open(expectation_suite) as infile:
                    expectation_suite = expectationSuiteSchema.loads(infile.read())
            except ValidationError:
                raise
            except OSError:
                raise GreatExpectationsError(('Unable to load expectation suite: IO error while reading %s' % expectation_suite))
        elif (not isinstance(expectation_suite, ExpectationSuite)):
            logger.error('Unable to validate using the provided value for expectation suite; does it need to be loaded from a dictionary?')
            if getattr(data_context, '_usage_statistics_handler', None):
                handler = data_context._usage_statistics_handler
                handler.send_usage_message(event='data_asset.validate', event_payload=handler._batch_anonymizer.anonymize_batch_info(self), success=False)
            return ExpectationValidationResult(success=False)
        if (data_context is not None):
            runtime_evaluation_parameters = data_context.evaluation_parameter_store.get_bind_params(run_id)
        else:
            runtime_evaluation_parameters = {}
        if expectation_suite.evaluation_parameters:
            runtime_evaluation_parameters.update(expectation_suite.evaluation_parameters)
        if (evaluation_parameters is not None):
            runtime_evaluation_parameters.update(evaluation_parameters)
        runtime_evaluation_parameters = recursively_convert_to_json_serializable(runtime_evaluation_parameters)
        suite_ge_version = (expectation_suite.meta.get('great_expectations_version') or expectation_suite.meta.get('great_expectations.__version__'))
        if suite_ge_version:
            if (suite_ge_version != ge_version):
                warnings.warn(('WARNING: This configuration object was built using version %s of great_expectations, but is currently being validated by version %s.' % (suite_ge_version, ge_version)))
        else:
            warnings.warn('WARNING: No great_expectations version found in configuration object.')
        columns = {}
        for expectation in expectation_suite.expectations:
            if (('column' in expectation.kwargs) and isinstance(expectation.kwargs['column'], Hashable)):
                column = expectation.kwargs['column']
            else:
                column = '_nocolumn'
            if (column not in columns):
                columns[column] = []
            columns[column].append(expectation)
        expectations_to_evaluate = []
        for col in columns:
            expectations_to_evaluate.extend(columns[col])
        for expectation in expectations_to_evaluate:
            try:
                expectation = copy.deepcopy(expectation)
                expectation_method = getattr(self, expectation.expectation_type)
                if (result_format is not None):
                    expectation.kwargs.update({'result_format': result_format})
                (evaluation_args, substituted_parameters) = build_evaluation_parameters(expectation.kwargs, runtime_evaluation_parameters, self._config.get('interactive_evaluation', True), self._data_context)
                result = expectation_method(catch_exceptions=catch_exceptions, include_config=True, **evaluation_args)
            except Exception as err:
                if catch_exceptions:
                    raised_exception = True
                    exception_traceback = traceback.format_exc()
                    result = ExpectationValidationResult(success=False, exception_info={'raised_exception': raised_exception, 'exception_traceback': exception_traceback, 'exception_message': str(err)})
                else:
                    raise err
            result.expectation_config = expectation
            if (catch_exceptions and (result.exception_info is None)):
                result.exception_info = {'raised_exception': False, 'exception_traceback': None, 'exception_message': None}
            results.append(result)
        statistics = _calc_validation_statistics(results)
        if only_return_failures:
            abbrev_results = []
            for exp in results:
                if (not exp.success):
                    abbrev_results.append(exp)
            results = abbrev_results
        expectation_suite_name = expectation_suite.expectation_suite_name
        result = ExpectationSuiteValidationResult(results=results, success=statistics.success, statistics={'evaluated_expectations': statistics.evaluated_expectations, 'successful_expectations': statistics.successful_expectations, 'unsuccessful_expectations': statistics.unsuccessful_expectations, 'success_percent': statistics.success_percent}, evaluation_parameters=runtime_evaluation_parameters, meta={'great_expectations_version': ge_version, 'expectation_suite_name': expectation_suite_name, 'run_id': run_id, 'batch_kwargs': self.batch_kwargs, 'batch_markers': self.batch_markers, 'batch_parameters': self.batch_parameters, 'validation_time': validation_time})
        self._data_context = validate__data_context
    except Exception:
        if getattr(data_context, '_usage_statistics_handler', None):
            handler = data_context._usage_statistics_handler
            handler.send_usage_message(event='data_asset.validate', event_payload=handler._batch_anonymizer.anonymize_batch_info(self), success=False)
        raise
    finally:
        self._active_validation = False
    if getattr(data_context, '_usage_statistics_handler', None):
        handler = data_context._usage_statistics_handler
        handler.send_usage_message(event='data_asset.validate', event_payload=handler._batch_anonymizer.anonymize_batch_info(self), success=True)
    return result
Generates a JSON-formatted report describing the outcome of all expectations.

Use the default expectation_suite=None to validate the expectations config associated with the DataAsset.

Args:
    expectation_suite (json or None):                 If None, uses the expectations config generated with the DataAsset during the current session.                 If a JSON file, validates those expectations.
    run_name (str):                 Used to identify this validation result as part of a collection of validations.                 See DataContext for more information.
    data_context (DataContext):                 A datacontext object to use as part of validation for binding evaluation parameters and                 registering validation results.
    evaluation_parameters (dict or None):                 If None, uses the evaluation_paramters from the expectation_suite provided or as part of the                 data_asset. If a dict, uses the evaluation parameters in the dictionary.
    catch_exceptions (boolean):                 If True, exceptions raised by tests will not end validation and will be described in the returned                 report.
    result_format (string or None):                 If None, uses the default value ('BASIC' or as specified).                 If string, the returned expectation output follows the specified format ('BOOLEAN_ONLY','BASIC',                 etc.).
    only_return_failures (boolean):                 If True, expectation results are only returned when ``success = False`` 
Returns:
    A JSON-formatted dictionary containing a list of the validation results.             An example of the returned format::

    {
      "results": [
        {
          "unexpected_list": [unexpected_value_1, unexpected_value_2],
          "expectation_type": "expect_*",
          "kwargs": {
            "column": "Column_Name",
            "output_format": "SUMMARY"
          },
          "success": true,
          "raised_exception: false.
          "exception_traceback": null
        },
        {
          ... (Second expectation results)
        },
        ... (More expectations results)
      ],
      "success": true,
      "statistics": {
        "evaluated_expectations": n,
        "successful_expectations": m,
        "unsuccessful_expectations": n - m,
        "success_percent": m / n
      }
    }

Notes:
   If the configuration object was built with a different version of great expectations then the            current environment. If no version was found in the configuration file.

Raises:
   AttributeError - if 'catch_exceptions'=None and an expectation throws an AttributeError
def validate(self, expectation_suite=None, run_id=None, data_context=None, evaluation_parameters=None, catch_exceptions=True, result_format=None, only_return_failures=False, run_name=None, run_time=None):
    'Generates a JSON-formatted report describing the outcome of all expectations.\n\n        Use the default expectation_suite=None to validate the expectations config associated with the DataAsset.\n\n        Args:\n            expectation_suite (json or None):                 If None, uses the expectations config generated with the DataAsset during the current session.                 If a JSON file, validates those expectations.\n            run_name (str):                 Used to identify this validation result as part of a collection of validations.                 See DataContext for more information.\n            data_context (DataContext):                 A datacontext object to use as part of validation for binding evaluation parameters and                 registering validation results.\n            evaluation_parameters (dict or None):                 If None, uses the evaluation_paramters from the expectation_suite provided or as part of the                 data_asset. If a dict, uses the evaluation parameters in the dictionary.\n            catch_exceptions (boolean):                 If True, exceptions raised by tests will not end validation and will be described in the returned                 report.\n            result_format (string or None):                 If None, uses the default value (\'BASIC\' or as specified).                 If string, the returned expectation output follows the specified format (\'BOOLEAN_ONLY\',\'BASIC\',                 etc.).\n            only_return_failures (boolean):                 If True, expectation results are only returned when ``success = False`` \n        Returns:\n            A JSON-formatted dictionary containing a list of the validation results.             An example of the returned format::\n\n            {\n              "results": [\n                {\n                  "unexpected_list": [unexpected_value_1, unexpected_value_2],\n                  "expectation_type": "expect_*",\n                  "kwargs": {\n                    "column": "Column_Name",\n                    "output_format": "SUMMARY"\n                  },\n                  "success": true,\n                  "raised_exception: false.\n                  "exception_traceback": null\n                },\n                {\n                  ... (Second expectation results)\n                },\n                ... (More expectations results)\n              ],\n              "success": true,\n              "statistics": {\n                "evaluated_expectations": n,\n                "successful_expectations": m,\n                "unsuccessful_expectations": n - m,\n                "success_percent": m / n\n              }\n            }\n\n        Notes:\n           If the configuration object was built with a different version of great expectations then the            current environment. If no version was found in the configuration file.\n\n        Raises:\n           AttributeError - if \'catch_exceptions\'=None and an expectation throws an AttributeError\n        '
    try:
        validation_time = datetime.datetime.now(datetime.timezone.utc).strftime('%Y%m%dT%H%M%S.%fZ')
        assert ((not (run_id and run_name)) and (not (run_id and run_time))), 'Please provide either a run_id or run_name and/or run_time.'
        if (isinstance(run_id, str) and (not run_name)):
            warnings.warn('String run_ids will be deprecated in the future. Please provide a run_id of type RunIdentifier(run_name=None, run_time=None), or a dictionary containing run_name and run_time (both optional). Instead of providing a run_id, you may also providerun_name and run_time separately.', DeprecationWarning)
            try:
                run_time = parse(run_id)
            except (ValueError, TypeError):
                pass
            run_id = RunIdentifier(run_name=run_id, run_time=run_time)
        elif isinstance(run_id, dict):
            run_id = RunIdentifier(**run_id)
        elif (not isinstance(run_id, RunIdentifier)):
            run_id = RunIdentifier(run_name=run_name, run_time=run_time)
        self._active_validation = True
        validate__data_context = self._data_context
        if ((data_context is None) and (self._data_context is not None)):
            data_context = self._data_context
        elif (data_context is not None):
            self._data_context = data_context
        results = []
        if (expectation_suite is None):
            expectation_suite = self.get_expectation_suite(discard_failed_expectations=False, discard_result_format_kwargs=False, discard_include_config_kwargs=False, discard_catch_exceptions_kwargs=False)
        elif isinstance(expectation_suite, str):
            try:
                with open(expectation_suite) as infile:
                    expectation_suite = expectationSuiteSchema.loads(infile.read())
            except ValidationError:
                raise
            except OSError:
                raise GreatExpectationsError(('Unable to load expectation suite: IO error while reading %s' % expectation_suite))
        elif (not isinstance(expectation_suite, ExpectationSuite)):
            logger.error('Unable to validate using the provided value for expectation suite; does it need to be loaded from a dictionary?')
            if getattr(data_context, '_usage_statistics_handler', None):
                handler = data_context._usage_statistics_handler
                handler.send_usage_message(event='data_asset.validate', event_payload=handler._batch_anonymizer.anonymize_batch_info(self), success=False)
            return ExpectationValidationResult(success=False)
        if (data_context is not None):
            runtime_evaluation_parameters = data_context.evaluation_parameter_store.get_bind_params(run_id)
        else:
            runtime_evaluation_parameters = {}
        if expectation_suite.evaluation_parameters:
            runtime_evaluation_parameters.update(expectation_suite.evaluation_parameters)
        if (evaluation_parameters is not None):
            runtime_evaluation_parameters.update(evaluation_parameters)
        runtime_evaluation_parameters = recursively_convert_to_json_serializable(runtime_evaluation_parameters)
        suite_ge_version = (expectation_suite.meta.get('great_expectations_version') or expectation_suite.meta.get('great_expectations.__version__'))
        if suite_ge_version:
            if (suite_ge_version != ge_version):
                warnings.warn(('WARNING: This configuration object was built using version %s of great_expectations, but is currently being validated by version %s.' % (suite_ge_version, ge_version)))
        else:
            warnings.warn('WARNING: No great_expectations version found in configuration object.')
        columns = {}
        for expectation in expectation_suite.expectations:
            if (('column' in expectation.kwargs) and isinstance(expectation.kwargs['column'], Hashable)):
                column = expectation.kwargs['column']
            else:
                column = '_nocolumn'
            if (column not in columns):
                columns[column] = []
            columns[column].append(expectation)
        expectations_to_evaluate = []
        for col in columns:
            expectations_to_evaluate.extend(columns[col])
        for expectation in expectations_to_evaluate:
            try:
                expectation = copy.deepcopy(expectation)
                expectation_method = getattr(self, expectation.expectation_type)
                if (result_format is not None):
                    expectation.kwargs.update({'result_format': result_format})
                (evaluation_args, substituted_parameters) = build_evaluation_parameters(expectation.kwargs, runtime_evaluation_parameters, self._config.get('interactive_evaluation', True), self._data_context)
                result = expectation_method(catch_exceptions=catch_exceptions, include_config=True, **evaluation_args)
            except Exception as err:
                if catch_exceptions:
                    raised_exception = True
                    exception_traceback = traceback.format_exc()
                    result = ExpectationValidationResult(success=False, exception_info={'raised_exception': raised_exception, 'exception_traceback': exception_traceback, 'exception_message': str(err)})
                else:
                    raise err
            result.expectation_config = expectation
            if (catch_exceptions and (result.exception_info is None)):
                result.exception_info = {'raised_exception': False, 'exception_traceback': None, 'exception_message': None}
            results.append(result)
        statistics = _calc_validation_statistics(results)
        if only_return_failures:
            abbrev_results = []
            for exp in results:
                if (not exp.success):
                    abbrev_results.append(exp)
            results = abbrev_results
        expectation_suite_name = expectation_suite.expectation_suite_name
        result = ExpectationSuiteValidationResult(results=results, success=statistics.success, statistics={'evaluated_expectations': statistics.evaluated_expectations, 'successful_expectations': statistics.successful_expectations, 'unsuccessful_expectations': statistics.unsuccessful_expectations, 'success_percent': statistics.success_percent}, evaluation_parameters=runtime_evaluation_parameters, meta={'great_expectations_version': ge_version, 'expectation_suite_name': expectation_suite_name, 'run_id': run_id, 'batch_kwargs': self.batch_kwargs, 'batch_markers': self.batch_markers, 'batch_parameters': self.batch_parameters, 'validation_time': validation_time})
        self._data_context = validate__data_context
    except Exception:
        if getattr(data_context, '_usage_statistics_handler', None):
            handler = data_context._usage_statistics_handler
            handler.send_usage_message(event='data_asset.validate', event_payload=handler._batch_anonymizer.anonymize_batch_info(self), success=False)
        raise
    finally:
        self._active_validation = False
    if getattr(data_context, '_usage_statistics_handler', None):
        handler = data_context._usage_statistics_handler
        handler.send_usage_message(event='data_asset.validate', event_payload=handler._batch_anonymizer.anonymize_batch_info(self), success=True)
    return result