Connect and query
This feature is in Public Preview in the following regions: us-east-1, us-west-2, eu-west-1, ap-southeast-1, ap-southeast-2, eu-central-1, us-east-2, ap-south-1.
Lakebase Provisioned Preview uses provisioned compute that you manually scale. For the new version of Lakebase, which supports autoscaling compute, branching, instant restore, and other advanced features, see Lakebase Postgres (Autoscaling Preview). See choosing between versions to understand which version is right for you.
This page outlines the different ways to work with your Lakebase database instance and recommends how to optimize PostgreSQL queries.
Ways to access your Database
Here are the following methods to access your database instance to run PostgreSQL queries and manage identities. As a managed Postgres service, there are some limitations in functionality. See Postgres compatibility.
Before connecting to your database using an external editor or Databricks notebooks, make sure you can authenticate to the database instance.
To connect Classic compute to PostgreSQL, open TCP port 5432 in your network security group to your workspace IP ACL address or range.
Method | Description |
|---|---|
Authenticate to a Lakebase database using OAuth tokens for Databricks identities (including machine‑to‑machine access) or native Postgres roles. | |
Connect to and query your database from the Databricks SQL editor. | |
Connect to and query from your database from Databricks notebooks. | |
Connect to and query from your database from external tools such as |
If you query through a Databricks SQL endpoint, the query is federated to a database instance.