great_expectations.rule_based_profiler.types.domain

Module Contents

Classes

SemanticDomainTypes()

Generic enumeration.

InferredSemanticDomainType()

A convenience class for migrating away from untyped dictionaries to stronger typed objects.

DomainKwargs()

Analogously to the way “SerializableDictDot” extends “DictDot” to provide JSON serialization, the present class,

Domain(domain_type: Union[str, MetricDomainTypes], domain_kwargs: Optional[Union[Dict[str, Any], DomainKwargs]] = None, details: Optional[Dict[str, Any]] = None)

Analogously to the way “SerializableDictDot” extends “DictDot” to provide JSON serialization, the present class,

Functions

build_domains_from_column_names(column_names: List[str])

Build column type domains from column names.

class great_expectations.rule_based_profiler.types.domain.SemanticDomainTypes

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

NUMERIC = numeric
TEXT = text
LOGIC = logic
DATETIME = datetime
BINARY = binary
CURRENCY = currency
VALUE_SET = value_set
IDENTIFIER = identifier
MISCELLANEOUS = miscellaneous
UNKNOWN = unknown
class great_expectations.rule_based_profiler.types.domain.InferredSemanticDomainType

Bases: great_expectations.types.SerializableDictDot

A convenience class for migrating away from untyped dictionaries to stronger typed objects.

Can be instantiated with arguments:

my_A = MyClassA(

foo=”a string”, bar=1,

)

Can be instantiated from a dictionary:

my_A = MyClassA(
**{

“foo”: “a string”, “bar”: 1,

}

)

Can be accessed using both dictionary and dot notation

my_A.foo == “a string” my_A.bar == 1

my_A[“foo”] == “a string” my_A[“bar”] == 1

Pairs nicely with @dataclass:

@dataclass() class MyClassA(DictDot):

foo: str bar: int

Can be made immutable:

@dataclass(frozen=True) class MyClassA(DictDot):

foo: str bar: int

For more examples of usage, please see test_dataclass_serializable_dot_dict_pattern.py in the tests folder.

semantic_domain_type :Optional[Union[str, SemanticDomainTypes]]
details :Optional[Dict[str, Any]]
to_dict(self)
to_json_dict(self)

# TODO: <Alex>2/4/2022</Alex> A reference implementation can be provided, once circular import dependencies, caused by relative locations of the “great_expectations/types/__init__.py” and “great_expectations/core/util.py” modules are resolved.

class great_expectations.rule_based_profiler.types.domain.DomainKwargs

Bases: great_expectations.types.SerializableDotDict

Analogously to the way “SerializableDictDot” extends “DictDot” to provide JSON serialization, the present class, “SerializableDotDict” extends “DotDict” to provide JSON-serializable version of the “DotDict” class as well. Since “DotDict” is already YAML-serializable, “SerializableDotDict” is both YAML-serializable and JSON-serializable.

to_dict(self)
to_json_dict(self)
class great_expectations.rule_based_profiler.types.domain.Domain(domain_type: Union[str, MetricDomainTypes], domain_kwargs: Optional[Union[Dict[str, Any], DomainKwargs]] = None, details: Optional[Dict[str, Any]] = None)

Bases: great_expectations.types.SerializableDotDict

Analogously to the way “SerializableDictDot” extends “DictDot” to provide JSON serialization, the present class, “SerializableDotDict” extends “DotDict” to provide JSON-serializable version of the “DotDict” class as well. Since “DotDict” is already YAML-serializable, “SerializableDotDict” is both YAML-serializable and JSON-serializable.

__repr__(self)

Return repr(self).

__str__(self)

Return str(self).

__eq__(self, other)

Return self==value.

__ne__(self, other)

Return self!=value.

property id(self)
to_json_dict(self)
_convert_dictionaries_to_domain_kwargs(self, source: Optional[Any] = None)
great_expectations.rule_based_profiler.types.domain.build_domains_from_column_names(column_names: List[str]) → List[Domain]

Build column type domains from column names.

Parameters

column_names – List of columns to convert.

Returns

A list of column type Domain objects built from column names.