Skip to main content
Version: 0.15.50

RuleBasedProfiler

class great_expectations.rule_based_profiler.RuleBasedProfiler(name: str, config_version: float, variables: Optional[Dict[str, Any]] = None, rules: Optional[Dict[str, Dict[str, Any]]] = None, data_context: Optional[AbstractDataContext] = None, id: Optional[str] = None)#

Create a RuleBasedProfiler to profile one or more batches of data.

For each rule in the rules configuration, instantiate the following if available: a domain builder, a parameter builder, and a configuration builder. These will be used to define profiler computation patterns.

Parameters
  • name – Give the Profiler a name.

  • config_version – Specify the version of the Profiler to use (currently only 1.0 is supported).

  • variables – Variables to be substituted within the rules.

  • rules – A collection of rule configurations, each having its own domain_builder, parameter_builders, and expectation_configuration_builders.

  • data_context – Define the full runtime environment (data access, etc.).

Returns

A RuleBasedProfiler instance.

run(variables: Optional[Dict[str, Any]] = None, rules: Optional[Dict[str, Dict[str, Any]]] = None, batch_list: Optional[List[Batch]] = None, batch_request: Optional[Union[BatchRequestBase, dict]] = None, runtime_configuration: Optional[dict] = None, reconciliation_directives: ReconciliationDirectives = ReconciliationDirectives(variables=<ReconciliationStrategy.UPDATE: 'update'>, domain_builder=<ReconciliationStrategy.UPDATE: 'update'>, parameter_builder=<ReconciliationStrategy.UPDATE: 'update'>, expectation_configuration_builder=<ReconciliationStrategy.UPDATE: 'update'>), variables_directives_list: Optional[List[RuntimeEnvironmentVariablesDirectives]] = None, domain_type_directives_list: Optional[List[RuntimeEnvironmentDomainTypeDirectives]] = None, comment: Optional[str] = None) RuleBasedProfilerResult#

Run the Rule-Based Profiler.

Parameters
  • variables – Attribute name/value pairs (overrides), commonly-used in Builder objects.

  • rules – A collection of rule configurations (overrides).

  • batch_list – The batches of data supplied at runtime.

  • batch_request – An explicit Batch Request used to supply data at runtime.

  • runtime_configuration – Additional runtime settings (see Validator.DEFAULT_RUNTIME_CONFIGURATION).

  • reconciliation_directives – Directives for how each rule component should be overwritten.

  • variables_directives_list – Additional override runtime variables directives (modify BaseRuleBasedProfiler).

  • domain_type_directives_list – Additional override runtime domain directives (modify BaseRuleBasedProfiler).

  • comment – A citation for the Expectation Suite returned as part of the RuleBasedProfilerResult.

Returns

A RuleBasedProfilerResult instance that contains the profiling output.

to_json_dict() dict#

Returns a JSON-serializable dict representation of this RuleBasedProfiler.

Returns

A JSON-serializable dict representation of this RuleBasedProfiler.