Skip to main content

Connect an application

info

Lakebase Autoscaling is available in the following regions: us-east-1, us-east-2, us-west-2, eu-central-1, eu-west-1, ap-south-1, ap-southeast-1, ap-southeast-2.

Lakebase Autoscaling is the latest version of Lakebase with autoscaling compute, scale-to-zero, branching, and instant restore. For feature comparison with Lakebase Provisioned, see choosing between versions.

Choose how to connect your application to Lakebase: Databricks Apps (recommended) or external applications using Postgres drivers (SDK or REST) or the Data API. Use Databricks Apps unless you must run in existing infrastructure or a specific framework/runtime outside Databricks.

Options

    • Databricks Apps
    • Recommended. Automatic app identity, auth, connections, and scaling. Best for new apps, dashboards, and internal tools.
    • External applications
    • Postgres drivers (SDK or REST) or Data API when you use existing infrastructure, a specific framework, or need to integrate with external systems.

Databricks Apps vs external applications

Aspect

Databricks Apps

External applications

Deployment

Runs on Databricks platform

Runs on external infrastructure

Identity

Platform provides app service principal automatically

Create and manage service principal manually

Setup

Create Postgres role; configure connection in app.yaml

Create service principal, Postgres role, and configure connection parameters

Authentication

WorkspaceClient uses app identity automatically (no credentials in code)

WorkspaceClient requires explicit service principal credentials

Best for

New apps, rapid prototyping, internal tools

Existing infrastructure, specific frameworks, systems outside Databricks

For automatic auth and connection management, see Connect a Databricks App to Lakebase Autoscaling.

External applications

If you use external hosting, choose how to connect:

Option

Languages/Use case

Key benefit

Connect external app to Lakebase using SDK

Python, Java, Go

SDK handles workspace token rotation

Connect external app to Lakebase using API

Node.js, Ruby, PHP, etc.

Manage both token exchanges yourself

Data API

HTTP

Serverless, mobile, or no Postgres driver