Skip to main content

Framework connection examples

info

Lakebase Autoscaling is available in the following regions: us-east-1, us-east-2, us-west-2, ca-central-1, sa-east-1, eu-central-1, eu-west-1, eu-west-2, 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. If you are a Lakebase Provisioned user, see Lakebase Provisioned.

The examples below show how to connect to your Lakebase database from different programming languages and frameworks. You can also get connection snippets for these languages from the Connect dialog in the Lakebase App.

Connection dialog examples

note

These examples use native Postgres password authentication. Connections using Databricks identities or service principals require OAuth token rotation. See Token rotation examples.

Connection examples

Bash
psql 'postgresql://role_name:password@ep-abc-123.databricks.com/databricks_postgres?sslmode=require'
note

For applications using OAuth tokens, implement automatic token rotation. See Token rotation examples.

Next steps