Skip to main content
DatabricksConnector lets OuterProduct read data from your Databricks SQL warehouse or cluster at training and inference time. You store your Databricks credential once in the OuterProduct Console using a personal access token and reference it by name in the SDK. No Databricks access tokens are ever passed through the SDK, as the OuterProduct backend authenticates directly with Databricks using the stored credential.

Add a Databricks credential in the Console

Before using DatabricksConnector from Python, create a credential in the OuterProduct Console and generate a personal access token in Databricks.
1

Open the New Connector wizard

Log in to console.outerproduct.com and navigate to Connectors. Click New Connector, give your connector a name, and select Databricks.
2

Generate a personal access token in Databricks

In your Databricks account, navigate to Settings → Developer → Access tokens and click Generate new token. When prompted, select Other APIs as the token type. Copy this token, as you’ll need it in the next step.
Assign the token to a Databricks user or service principal that has SELECT access on the tables you want OuterProduct to read.
3

Enter your Databricks credentials

Paste your Databricks server hostname, HTTP path, and the personal access token you just generated into the connector wizard.
4

Save the connector

Click Add connector. Your credential is now stored in the Console and ready to use from the SDK.

Use it from Python

Once your credential is saved in the Console, instantiate DatabricksConnector with your workspace details and credential name, then call .table() with the name of the table you want to use.
import outerproduct as op

connector = op.DatabricksConnector(
    server_hostname="adb-123.azuredatabricks.net",
    http_path="/sql/1.0/warehouses/abc",
    schema_name="default",
    catalog="main",
    connector_credential_name="prod-databricks",
)
dataset = connector.table("customers")

model = op.reasoning.fit(dataset, task=op.Binclass(label_column="churn")).wait()
Find your server_hostname and http_path in the Databricks SQL warehouse UI under Connection details. The http_path changes if you switch warehouses, so update your connector accordingly.
The connector_credential_name argument must match exactly the name you gave your connector in the OuterProduct Console.

Other connectors