great_expectations.data_context.types.base

Module Contents

Classes

DataContextConfig(config_version, datasources, expectations_store_name, validations_store_name, evaluation_parameter_store_name, plugins_directory, validation_operators, stores, data_docs_sites, config_variables_file_path=None, anonymous_usage_statistics=None, commented_map=None)

DatasourceConfig(class_name, module_name=None, data_asset_type=None, batch_kwargs_generators=None, credentials=None, reader_method=None, limit=None, **kwargs)

AnonymizedUsageStatisticsConfig(enabled=True, data_context_id=None, usage_statistics_url=None)

AnonymizedUsageStatisticsConfigSchema(*, only: types.StrSequenceOrSet = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: typing.Dict = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: typing.Union[bool, types.StrSequenceOrSet] = False, unknown: str = None)

Base schema class with which to define custom schemas.

DatasourceConfigSchema(*, only: types.StrSequenceOrSet = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: typing.Dict = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: typing.Union[bool, types.StrSequenceOrSet] = False, unknown: str = None)

Base schema class with which to define custom schemas.

DataContextConfigSchema(*, only: types.StrSequenceOrSet = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: typing.Dict = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: typing.Union[bool, types.StrSequenceOrSet] = False, unknown: str = None)

Base schema class with which to define custom schemas.

great_expectations.data_context.types.base.logger
great_expectations.data_context.types.base.yaml
great_expectations.data_context.types.base.CURRENT_CONFIG_VERSION = 2
great_expectations.data_context.types.base.MINIMUM_SUPPORTED_CONFIG_VERSION = 2
great_expectations.data_context.types.base.DEFAULT_USAGE_STATISTICS_URL = https://stats.greatexpectations.io/great_expectations/v1/usage_statistics
class great_expectations.data_context.types.base.DataContextConfig(config_version, datasources, expectations_store_name, validations_store_name, evaluation_parameter_store_name, plugins_directory, validation_operators, stores, data_docs_sites, config_variables_file_path=None, anonymous_usage_statistics=None, commented_map=None)

Bases: great_expectations.types.DictDot

property commented_map(self)
property config_version(self)
classmethod from_commented_map(cls, commented_map)
to_yaml(self, outfile)
class great_expectations.data_context.types.base.DatasourceConfig(class_name, module_name=None, data_asset_type=None, batch_kwargs_generators=None, credentials=None, reader_method=None, limit=None, **kwargs)

Bases: great_expectations.types.DictDot

property class_name(self)
property module_name(self)
class great_expectations.data_context.types.base.AnonymizedUsageStatisticsConfig(enabled=True, data_context_id=None, usage_statistics_url=None)

Bases: great_expectations.types.DictDot

property enabled(self)
property data_context_id(self)
property explicit_id(self)
property usage_statistics_url(self)
class great_expectations.data_context.types.base.AnonymizedUsageStatisticsConfigSchema(*, only: types.StrSequenceOrSet = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: typing.Dict = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: typing.Union[bool, types.StrSequenceOrSet] = False, unknown: str = None)

Bases: marshmallow.Schema

Base schema class with which to define custom schemas.

Example usage:

import datetime as dt
from dataclasses import dataclass

from marshmallow import Schema, fields


@dataclass
class Album:
    title: str
    release_date: dt.date


class AlbumSchema(Schema):
    title = fields.Str()
    release_date = fields.Date()


album = Album("Beggars Banquet", dt.date(1968, 12, 6))
schema = AlbumSchema()
data = schema.dump(album)
data  # {'release_date': '1968-12-06', 'title': 'Beggars Banquet'}
Parameters
  • only – Whitelist of the declared fields to select when instantiating the Schema. If None, all fields are used. Nested fields can be represented with dot delimiters.

  • exclude – Blacklist of the declared fields to exclude when instantiating the Schema. If a field appears in both only and exclude, it is not used. Nested fields can be represented with dot delimiters.

  • many – Should be set to True if obj is a collection so that the object will be serialized to a list.

  • context – Optional context passed to fields.Method and fields.Function fields.

  • load_only – Fields to skip during serialization (write-only fields)

  • dump_only – Fields to skip during deserialization (read-only fields)

  • partial – Whether to ignore missing fields and not require any fields declared. Propagates down to Nested fields as well. If its value is an iterable, only missing fields listed in that iterable will be ignored. Use dot delimiters to specify nested fields.

  • unknown – Whether to exclude, include, or raise an error for unknown fields in the data. Use EXCLUDE, INCLUDE or RAISE.

Changed in version 3.0.0: prefix parameter removed.

Changed in version 2.0.0: __validators__, __preprocessors__, and __data_handlers__ are removed in favor of marshmallow.decorators.validates_schema, marshmallow.decorators.pre_load and marshmallow.decorators.post_dump. __accessor__ and __error_handler__ are deprecated. Implement the handle_error and get_attribute methods instead.

data_context_id
enabled
usage_statistics_url
_explicit_url
make_usage_statistics_config(self, data, **kwargs)
filter_implicit(self, data, **kwargs)
class great_expectations.data_context.types.base.DatasourceConfigSchema(*, only: types.StrSequenceOrSet = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: typing.Dict = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: typing.Union[bool, types.StrSequenceOrSet] = False, unknown: str = None)

Bases: marshmallow.Schema

Base schema class with which to define custom schemas.

Example usage:

import datetime as dt
from dataclasses import dataclass

from marshmallow import Schema, fields


@dataclass
class Album:
    title: str
    release_date: dt.date


class AlbumSchema(Schema):
    title = fields.Str()
    release_date = fields.Date()


album = Album("Beggars Banquet", dt.date(1968, 12, 6))
schema = AlbumSchema()
data = schema.dump(album)
data  # {'release_date': '1968-12-06', 'title': 'Beggars Banquet'}
Parameters
  • only – Whitelist of the declared fields to select when instantiating the Schema. If None, all fields are used. Nested fields can be represented with dot delimiters.

  • exclude – Blacklist of the declared fields to exclude when instantiating the Schema. If a field appears in both only and exclude, it is not used. Nested fields can be represented with dot delimiters.

  • many – Should be set to True if obj is a collection so that the object will be serialized to a list.

  • context – Optional context passed to fields.Method and fields.Function fields.

  • load_only – Fields to skip during serialization (write-only fields)

  • dump_only – Fields to skip during deserialization (read-only fields)

  • partial – Whether to ignore missing fields and not require any fields declared. Propagates down to Nested fields as well. If its value is an iterable, only missing fields listed in that iterable will be ignored. Use dot delimiters to specify nested fields.

  • unknown – Whether to exclude, include, or raise an error for unknown fields in the data. Use EXCLUDE, INCLUDE or RAISE.

Changed in version 3.0.0: prefix parameter removed.

Changed in version 2.0.0: __validators__, __preprocessors__, and __data_handlers__ are removed in favor of marshmallow.decorators.validates_schema, marshmallow.decorators.pre_load and marshmallow.decorators.post_dump. __accessor__ and __error_handler__ are deprecated. Implement the handle_error and get_attribute methods instead.

class Meta
unknown
class_name
module_name
data_asset_type
batch_kwargs_generators
credentials
validate_schema(self, data, **kwargs)
make_datasource_config(self, data, **kwargs)
class great_expectations.data_context.types.base.DataContextConfigSchema(*, only: types.StrSequenceOrSet = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: typing.Dict = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: typing.Union[bool, types.StrSequenceOrSet] = False, unknown: str = None)

Bases: marshmallow.Schema

Base schema class with which to define custom schemas.

Example usage:

import datetime as dt
from dataclasses import dataclass

from marshmallow import Schema, fields


@dataclass
class Album:
    title: str
    release_date: dt.date


class AlbumSchema(Schema):
    title = fields.Str()
    release_date = fields.Date()


album = Album("Beggars Banquet", dt.date(1968, 12, 6))
schema = AlbumSchema()
data = schema.dump(album)
data  # {'release_date': '1968-12-06', 'title': 'Beggars Banquet'}
Parameters
  • only – Whitelist of the declared fields to select when instantiating the Schema. If None, all fields are used. Nested fields can be represented with dot delimiters.

  • exclude – Blacklist of the declared fields to exclude when instantiating the Schema. If a field appears in both only and exclude, it is not used. Nested fields can be represented with dot delimiters.

  • many – Should be set to True if obj is a collection so that the object will be serialized to a list.

  • context – Optional context passed to fields.Method and fields.Function fields.

  • load_only – Fields to skip during serialization (write-only fields)

  • dump_only – Fields to skip during deserialization (read-only fields)

  • partial – Whether to ignore missing fields and not require any fields declared. Propagates down to Nested fields as well. If its value is an iterable, only missing fields listed in that iterable will be ignored. Use dot delimiters to specify nested fields.

  • unknown – Whether to exclude, include, or raise an error for unknown fields in the data. Use EXCLUDE, INCLUDE or RAISE.

Changed in version 3.0.0: prefix parameter removed.

Changed in version 2.0.0: __validators__, __preprocessors__, and __data_handlers__ are removed in favor of marshmallow.decorators.validates_schema, marshmallow.decorators.pre_load and marshmallow.decorators.post_dump. __accessor__ and __error_handler__ are deprecated. Implement the handle_error and get_attribute methods instead.

config_version
datasources
expectations_store_name
validations_store_name
evaluation_parameter_store_name
plugins_directory
validation_operators
stores
data_docs_sites
config_variables_file_path
anonymous_usage_statistics
handle_error(self, exc, data, **kwargs)

Log and raise our custom exception when (de)serialization fails.

validate_schema(self, data, **kwargs)
great_expectations.data_context.types.base.dataContextConfigSchema
great_expectations.data_context.types.base.datasourceConfigSchema
great_expectations.data_context.types.base.anonymizedUsageStatisticsSchema