| Name | Type | Description |
|---|---|---|
catalog* | str | The catalog name in the Databricks database. |
schema* | str | The schema name in the catalog. |
host | Optional[str] | Default: NoneThe Databricks workspace hostname, excluding 'https://' part. If not provided, it attempts to fetch from the environment variable 'DATABRICKS_HOST'. If still unavailable and if running in a Databricks notebook, it defaults to the current workspace hostname. Defaults to None. |
api_token | Optional[str] | Default: None |
warehouse_id | Optional[str] | Default: None |
cluster_id | Optional[str] | Default: None |
engine_args | Optional[dict] | Default: None |
**kwargs | Any | Default: {} |
Class method to create an SQLDatabase instance from a Databricks connection.
This method requires the 'databricks-sql-connector' package. If not installed,
it can be added using pip install databricks-sql-connector.
The Databricks personal access token for accessing the Databricks SQL warehouse or the cluster. If not provided, it attempts to fetch from 'DATABRICKS_TOKEN'. If still unavailable and running in a Databricks notebook, a temporary token for the current user is generated. Defaults to None.
The warehouse ID in the Databricks SQL. If provided, the method configures the connection to use this warehouse. Cannot be used with 'cluster_id'. Defaults to None.
The cluster ID in the Databricks Runtime. If 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.
The arguments to be used when connecting Databricks. Defaults to None.
Additional keyword arguments for the from_uri method.