Databricks configuration for Posit Workbench and Posit Connect

To configure Posit Workbench and Posit Connect so that users can access Databricks as a data source, you need to ensure users have appropriate tooling and a way to securely provide their connection credentials.

Tooling

Connecting to Databricks requires tooling that varies depending on the type of compute you use:

All-purpose compute (Spark)

  • Clusters utilize Spark for large-scale data processing and machine learning.
  • Uses Spark APIs and libraries in R or Python (e.g., {sparklyr} in R or databricks-connect in Python).
  • Because these are standard language packages, users typically manage these within their environments; the Posit server does not usually require system-level admin configuration.

Serverless SQL warehouses (SQL)

  • Often preferred for traditional SQL querying and BI-style workloads.
  • Uses ODBC (or JDBC) to execute SQL queries.
  • You need to install Posit Professional Drivers on Workbench and Connect servers. See the Posit Professional Drivers Installation instructions.
  • Configure Data Source Names (DSNs) or connection strings so user sessions can use the driver. See the Posit Professional Drivers Configuration instructions.
  • Once drivers are installed, users use R packages like DBI and odbc or Python packages like pyodbc or databricks-sql-connector to connect.

Workbench configuration

Workbench includes a native integration for Managed Databricks OAuth Credentials. This is the recommended approach to ensuring users have secure and low-friction access to Databricks.

  • Users sign in to Databricks directly when launching a Workbench session.
  • Tooling that supports Databricks unified authentication will automatically use these credentials.
  • Users do not need to take any action to set up credentials after signing in.
  • Workbench handles token refreshes in the background, preventing session timeouts.
  • See Integrate Workbench with Databricks for setup steps.

Connect configuration

Connect features OAuth and Workload Identity integrations with Databricks so that content publishers can securely access short-lived OAuth access tokens with limited permissions to access Databricks resources.

  • Content can run using the viewer’s identity, a service account, or workload identity.
  • Content publishers can securely access tokens, avoiding the need to embed long-lived credentials in their code.
  • Refer to the Connect Databricks OAuth Integration section for detailed setup.