Skip to main content
Version: 1.0 prerelease

BaseDatasource

class great_expectations.datasource.BaseDatasource(name: str, execution_engine: Optional[dict] = None, data_context_root_directory: Optional[str] = None, id: Optional[str] = None)#

A Datasource is the glue between an ExecutionEngine and a DataConnector. This class should be considered abstract and not directly instantiated; please use Datasource instead.

Parameters:
  • name – the name for the datasource

  • execution_engine – the type of compute engine to produce

  • data_context_root_directory – Installation directory path (if installed on a filesystem).

  • id – Identifier specific to this datasource.

get_available_data_asset_names(data_connector_names: Optional[Union[list, str]] = None) Dict[str, List[str]]#

Returns a dictionary of data_asset_names that the specified dataconnector can provide.

Note that some data_connectors may not be capable of describing specific named data assets, and some (such as inferred_asset_data_connector) require the user to configure data asset names.

Example return value:

{
data_connector_name: {
names: [ data_asset_1, data_asset_2 … ]
}

}

Parameters:

data_connector_names – the DataConnector for which to get available data asset names.

Returns:

Dictionary consisting of sets of data assets available for the specified data connectors.