Skip to main content
Version: 0.18.21

DataAssistantResult

class great_expectations.rule_based_profiler.data_assistant_result.DataAssistantResult(_batch_id_to_batch_identifier_display_name_map: Optional[Dict[str, Set[tuple[str, Any]]]] = None, profiler_config: Optional[RuleBasedProfilerConfig] = None, profiler_execution_time: Optional[float] = None, rule_domain_builder_execution_time: Optional[Dict[str, float]] = None, rule_execution_time: Optional[Dict[str, float]] = None, rule_exception_tracebacks: Optional[Dict[str, Optional[str]]] = None, metrics_by_domain: Optional[Dict[Domain, Dict[str, ParameterNode]]] = None, expectation_configurations: Optional[List[ExpectationConfiguration]] = None, citation: Optional[dict] = None, _usage_statistics_handler: Optional[UsageStatisticsHandler] = None)#

Result from a Data Assistant run, plus plotting functionality.

Parameters
  • profiler_config – Effective Rule-Based Profiler configuration.

  • profiler_execution_time – Effective Rule-Based Profiler overall execution time in seconds.

  • rule_domain_builder_execution_time – Effective Rule-Based Profiler per-Rule DomainBuilder execution time in seconds.

  • rule_execution_time – Effective Rule-Based Profiler per-Rule execution time in seconds.

  • rule_exception_tracebacks – Effective Rule-Based Profiler per-Rule exception tracebacks.

  • metrics_by_domain – Metrics by Domain.

  • expectation_configurations – Expectation configurations.

  • citation – Citations.

  • _batch_id_to_batch_identifier_display_name_map – Mapping from “batch_id” values to friendly display names.

get_expectation_suite(expectation_suite_name: Optional[str] = None, include_profiler_config: bool = False, send_usage_event: bool = True) ExpectationSuite#

Get Expectation Suite from “DataAssistantResult” object.

Parameters
  • expectation_suite_name – The name for the Expectation Suite. Default generated if none provided.

  • include_profiler_config – Whether to include the rule-based profiler config used by the data assistant to generate the Expectation Suite.

  • send_usage_event – Set to False to disable sending usage events for this method.

Returns

ExpectationSuite object.

plot_expectations_and_metrics(sequential: bool = True, theme: Optional[Dict[str, Any]] = None, include_column_names: Optional[List[str]] = None, exclude_column_names: Optional[List[str]] = None) great_expectations.rule_based_profiler.data_assistant_result.plot_result.PlotResult#

Use contents of DataAssistantResult object to display metrics and expectations for visualization purposes.

Altair theme configuration reference:

Configuration.Html

Parameters
  • sequential – Whether the batches are sequential or not.

  • theme – Altair top-level chart configuration dictionary.

  • include_column_names – Columns to include in expectations and metrics plot.

  • exclude_column_names – Columns to exclude from expectations and metrics plot.

Returns

PlotResult wrapper object around Altair charts.

plot_metrics(sequential: bool = True, theme: Optional[Dict[str, Any]] = None, include_column_names: Optional[List[str]] = None, exclude_column_names: Optional[List[str]] = None) great_expectations.rule_based_profiler.data_assistant_result.plot_result.PlotResult#

Use contents of DataAssistantResult object to display metrics for visualization purposes.

Altair theme configuration reference:

Configuration.Html

Parameters
  • sequential – Whether the batches are sequential or not.

  • theme – Altair top-level chart configuration dictionary.

  • include_column_names – Columns to include in metrics plot.

  • exclude_column_names – Columns to exclude from metrics plot.

Returns

PlotResult wrapper object around Altair charts.

show_expectations_by_expectation_type(expectation_suite_name: Optional[str] = None, include_profiler_config: bool = False, send_usage_event: bool = True) None#

Populates an ExpectationSuite and displays ExpectationConfiguration list grouped by expectation_type.

Parameters
  • expectation_suite_name – The name for the Expectation Suite. Default generated if none provided.

  • include_profiler_config – Whether to include the rule-based profiler config used by the data assistant to generate the Expectation Suite.

  • send_usage_event – Set to False to disable sending usage events for this method.

to_json_dict() dict#

Returns JSON dictionary equivalent of this object.

Returns

A JSON-serializable dictionary representation of the DataAssistantResult object.