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: typing.Optional[typing.Dict[str, typing.Any]] = None, rules: typing.Optional[typing.Dict[str, typing.Dict[str, typing.Any]]] = None, batch_list: typing.Optional[typing.List[great_expectations.core.batch.Batch]] = None, batch_request: typing.Optional[typing.Union[great_expectations.core.batch.BatchRequestBase, dict]] = None, runtime_configuration: typing.Optional[dict] = None, reconciliation_directives: great_expectations.rule_based_profiler.helpers.configuration_reconciliation.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: typing.Optional[typing.List[great_expectations.rule_based_profiler.helpers.runtime_environment.RuntimeEnvironmentVariablesDirectives]] = None, domain_type_directives_list: typing.Optional[typing.List[great_expectations.rule_based_profiler.helpers.runtime_environment.RuntimeEnvironmentDomainTypeDirectives]] = None, comment: typing.Optional[str] = None) great_expectations.rule_based_profiler.rule_based_profiler_result.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.