Comhroinn trí


Connect and query

Important

Lakebase Provisioned is in Public Preview in the following regions: westus, westus2, eastus, eastus2, centralus, southcentralus, northeurope, westeurope, australiaeast, brazilsouth, canadacentral, centralindia, southeastasia, uksouth.

Lakebase Provisioned uses provisioned compute that you manually scale. For feature comparison with the new Lakebase Autoscaling, see choosing between versions.

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 PostgreSQL compatibility.

Before connecting to your database using an external editor or Azure Databricks notebooks, make sure you can authenticate to the database instance.

Note

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 Authenticate to a Lakebase database using OAuth tokens for Databricks identities (including machine‑to‑machine access) or native Postgres roles.
SQL editor Connect to and query your database from the Databricks SQL editor.
Azure Databricks notebooks Connect to and query from your database from Azure Databricks notebooks.
SQL clients Connect to and query from your database from external tools such as psql, DBeaver, and pgAdmin.

If you query through a Databricks SQL endpoint, the query is federated to a database instance.