Skip to main content

DataContext.test_yaml_config

Back to class documentation

Fully qualified path​

great_expectations.data_context.data_context.data_context.DataContext.test_yaml_config

Synopsis​

Convenience method for testing yaml configs

test_yaml_config is a convenience method for configuring the moving parts of a Great Expectations deployment. It allows you to quickly test out configs for system components, especially Datasources, Checkpoints, and Stores.

For many deployments of Great Expectations, these components (plus Expectations) are the only ones you'll need.

test_yaml_config is mainly intended for use within notebooks and tests.

Parameters​

ParameterTypingDefaultDescription
self
yaml_configstrA string containing the yaml config to be tested
nameUnion[str, NoneType]None(Optional) A string containing the name of the component to instantiate
class_nameUnion[str, NoneType]None
runtime_environmentUnion[dict, NoneType]None
pretty_printboolTrueDetermines whether to print human-readable output
return_modeUnion[Literal['instantiated_class'], Literal['report_object']]'instantiated_class'Determines what type of object test_yaml_config will return. Valid modes are "instantiated_class" and "report_object"
shorten_tracebacksboolFalseIf true, catch any errors during instantiation and print only the last element of the traceback stack. This can be helpful for rapid iteration on configs in a notebook, because it can remove the need to scroll up and down a lot.

Returns​

The instantiated component (e.g. a Datasource) OR a json object containing metadata from the component's self_check method. The returned object is determined by return_mode.