provided, the method configures the connection to use this cluster.
Cannot be used with ‘warehouse_id’. If running in a Databricks notebook
and both ‘warehouse_id’ and ‘cluster_id’ are None, it uses the ID of the
cluster the notebook is attached to. Defaults to None.
engine_args (Optional[dict]) – The arguments to be used when connecting
Databricks. Defaults to None.
**kwargs (Any) – Additional keyword arguments for the from_uri method.
Returns
An instance of SQLDatabase configured with the providedDatabricks connection details.
Return type
SQLDatabase
Raises
ValueError – If ‘databricks-sql-connector’ is not found, or if both
    ‘warehouse_id’ and ‘cluster_id’ are provided, or if neither
    ‘warehouse_id’ nor ‘cluster_id’ are provided and it’s not executing
    inside a Databricks notebook.
classmethod from_uri(database_uri: str, engine_args: Optional[dict] = None, **kwargs: Any) → SQLDatabase[source]¶
Construct a SQLAlchemy engine from URI.
get_table_info(table_names: Optional[List[str]] = None) → str[source]¶
Get information about specified tables.
Follows best practices as specified in: Rajkumar et al, 2022
(https://arxiv.org/abs/2204.00498)
If sample_rows_in_table_info, the specified number of sample rows will be
appended to each table description. This can increase performance as
demonstrated in the paper.
get_table_info_no_throw(table_names: Optional[List[str]] = None) → str[source]¶
Get information about specified tables.
Follows best practices as specified in: Rajkumar et al, 2022
(https://arxiv.org/abs/2204.00498)