great_expectations.rule_based_profiler.domain_builder.categorical_column_domain_builder

Module Contents

Classes

CategoricalColumnDomainBuilder(batch_list: Optional[List[Batch]] = None, batch_request: Optional[Union[BatchRequest, RuntimeBatchRequest, dict]] = None, data_context: Optional[‘DataContext’] = None, limit_mode: Optional[Union[CardinalityLimitMode, str]] = None, max_unique_values: Optional[int] = None, max_proportion_unique: Optional[int] = None, exclude_columns: Optional[List[str]] = None)

This DomainBuilder uses column cardinality to identify domains.

class great_expectations.rule_based_profiler.domain_builder.categorical_column_domain_builder.CategoricalColumnDomainBuilder(batch_list: Optional[List[Batch]] = None, batch_request: Optional[Union[BatchRequest, RuntimeBatchRequest, dict]] = None, data_context: Optional['DataContext'] = None, limit_mode: Optional[Union[CardinalityLimitMode, str]] = None, max_unique_values: Optional[int] = None, max_proportion_unique: Optional[int] = None, exclude_columns: Optional[List[str]] = None)

Bases: great_expectations.rule_based_profiler.domain_builder.DomainBuilder

This DomainBuilder uses column cardinality to identify domains.

property domain_type(self)
property exclude_columns(self)
_get_domains(self, variables: Optional[ParameterContainer] = None)

Return domains matching the selected limit_mode.

Parameters

variables – Optional variables to substitute when evaluating.

Returns

List of domains that match the desired cardinality.

_get_table_column_names_from_active_batch(self, validator: Validator, batch_id: str)

Retrieve table column names from the active batch.

Parameters

validator – Validator to use in retrieving columns.

Returns

List of column names from the active batch.

_generate_metric_configurations_to_check_cardinality(self, batch_ids: List[str], column_names: List[str])

Generate metric configurations used to compute metrics for checking cardinality.

Parameters
  • batch_ids – List of batch_ids used to create metric configurations.

  • column_names – List of column names used to create metric configurations.

Returns

List[MetricConfiguration]},…]

Return type

List of dicts of the form [{column_name

_columns_meeting_cardinality_limit(self, validator: Validator, table_column_names: List[str], metrics_for_cardinality_check: List[Dict[str, List[MetricConfiguration]]])

Compute cardinality and return column names meeting cardinality limit.

Parameters
  • validator – Validator used to compute column cardinality.

  • table_column_names – column names to verify cardinality.

  • metrics_for_cardinality_check – metric configurations used to compute cardinality.

Returns

List of column names meeting cardinality.