Skip to content

Databricks

Installation

pip install "toolfront[databricks]"

Connection Parameters

Connect using the Database.from_databricks() method with parameters:

from toolfront import Database

db = Database.from_databricks(
    server_hostname="workspace.databricks.com",
    http_path="/sql/1.0/warehouses/warehouse-id",
    access_token="token",
    catalog="sales"
)

revenue = db.ask("What's our total revenue this month?")
PARAMETER DESCRIPTION
server_hostname

Databricks workspace hostname.

TYPE: str

http_path

HTTP path to the Databricks warehouse.

TYPE: str

access_token

Personal access token for authentication.

TYPE: str

catalog

Name of the catalog to use.

TYPE: str DEFAULT: None

schema

Name of the schema to use.

TYPE: str DEFAULT: None

match_schema

Regex pattern to filter schemas. Mutually exclusive with match_tables.

TYPE: str DEFAULT: None

match_tables

Regex pattern to filter tables. Mutually exclusive with match_schema.

TYPE: str DEFAULT: None

**kwargs

Additional arguments passed to the DBAPI connection call.

TYPE: Any DEFAULT: {}