Data Context Module¶
-
great_expectations.data_context.
get_data_context
(context_type, options, *args, **kwargs)¶ Return a data_context object which exposes options to list datasets and get a dataset from that context. This is a new API in Great Expectations 0.4, and is subject to rapid change.
Parameters: - context_type – (string) one of “SqlAlchemy”, “PandasCSV”, “SparkCSV”, or “DatabricksTable”
- options – options to be passed to the data context’s connect method.
Returns: a new DataContext object
great_expectations.data_context.base¶
-
class
great_expectations.data_context.base.
DataContext
(options, *args, **kwargs)¶ Bases:
object
A generic DataContext, exposing the base API including constructor with options parameter, list_datasets, and get_dataset.
Warning: this feature is new in v0.4 and may change based on community feedback.
-
connect
(options)¶
-
list_datasets
()¶
-
get_dataset
(dataset_name, caching=False, **kwargs)¶
-
great_expectations.data_context.PandasCSVDataContext¶
-
class
great_expectations.data_context.pandas_context.
PandasCSVDataContext
(*args, **kwargs)¶ Bases:
great_expectations.data_context.base.DataContext
A PandasCSVDataContext makes it easy to get a list of files available in the list_datasets method. Its get_dataset method returns a new Pandas dataset with the provided name.
Warning: this feature is new in v0.4 and may change based on community feedback.
-
connect
(options)¶
-
list_datasets
()¶
-
get_dataset
(dataset_name, caching=False, **kwargs)¶
-
great_expectations.data_context.SqlAlchemyDataContext¶
-
class
great_expectations.data_context.sqlalchemy_context.
SqlAlchemyDataContext
(*args, **kwargs)¶ Bases:
great_expectations.data_context.base.DataContext
A SqlAlchemyDataContext creates a SQLAlchemy engine and provides a list of tables available in the list_datasets method. Its get_dataset method returns a new SqlAlchemy dataset with the provided name.
Warning: this feature is new in v0.4 and may change based on community feedback.
-
connect
(options, *args, **kwargs)¶
-
list_datasets
()¶
-
get_dataset
(dataset_name, custom_sql=None, schema=None, caching=False)¶
-