Skip to main content
Version: 0.18.9

InferredAssetSqlDataConnector

class great_expectations.datasource.data_connector.InferredAssetSqlDataConnector(name: str, datasource_name: str, execution_engine: SqlAlchemyExecutionEngine, data_asset_name_prefix: str = '', data_asset_name_suffix: str = '', include_schema_name: bool = False, splitter_method: Optional[str] = None, splitter_kwargs: Optional[dict] = None, sampling_method: Optional[str] = None, sampling_kwargs: Optional[dict] = None, excluded_tables: Optional[list] = None, included_tables: Optional[list] = None, skip_inapplicable_tables: bool = True, introspection_directives: Optional[dict] = None, batch_spec_passthrough: Optional[dict] = None, id: Optional[str] = None)#

An Inferred Asset Data Connector used to connect to an SQL database.

This Data Connector determines Data Asset names by introspecting the database schema.

Parameters
  • name – The name of the Data Connector.

  • datasource_name – The name of this Data Connector’s Datasource.

  • execution_engine – The Execution Engine object to used by this Data Connector to read the data.

  • data_asset_name_prefix – A prefix to prepend to all names of Data Assets inferred by this Data Connector.

  • data_asset_name_suffix – A suffix to append to all names of Data Asset inferred by this Data Connector.

  • include_schema_name – If True the Data Asset name will include the schema as a prefix.

  • splitter_method – A method to use to split the target table into multiple Batches.

  • splitter_kwargs – Keyword arguments to pass to the splitter method.

  • sampling_method – A method to use to downsample within a target Batch.

  • sampling_kwargs – Keyword arguments to pass to sampling method.

  • excluded_tables – A list of tables to ignore when inferring Data Asset names.

  • included_tables – A list of tables to include when inferring Data Asset names. When provided, only Data Assets matching this list will be inferred.

  • skip_inapplicable_tables – If True, tables that can’t be successfully queried using sampling and splitter methods are excluded from inferred data_asset_names. If False, the class will throw an error during initialization if any such tables are encountered.

  • introspection_directives – Arguments passed to the introspection method to guide introspection. These may be,schema_name, which filters to a specific schema,ignore_information_schemas_and_system_tables, which defaults to True,information_schemas, a list of schemas to consider as informational,system_tables, a list of tables to consider system tables, and include_views which defaults to True.

  • batch_spec_passthrough – Dictionary with keys that will be added directly to the batch spec.

  • id – The unique identifier for this Data Connector used when running in cloud mode.

get_available_data_asset_names() List[str]#

Return the list of asset names known by this DataConnector.

Returns

A list of available names