Nota
Capaian ke halaman ini memerlukan kebenaran. Anda boleh cuba mendaftar masuk atau menukar direktori.
Capaian ke halaman ini memerlukan kebenaran. Anda boleh cuba menukar direktori.
Important
Lakebase Provisioned is the original Lakebase offering that uses provisioned compute you scale manually. For supported regions, see Region availability. For the latest version of Lakebase, with autoscaling compute, scale-to-zero, branching, and instant restore, see Lakebase Autoscaling.
New Lakebase instances will be created as Autoscaling projects. Rollout starts March 12, 2026. For details, see Autoscaling by default.
This page describes how to connect to a Lakebase Provisioned database instance from the SQL editor and external SQL clients.
Before you begin
- You have a corresponding Postgres role for your Azure Databricks identity. See Postgres roles.
- Your Postgres role is granted the necessary permissions to access the database, schema, or table.
- You can authenticate to the database instance. See Authenticate to a database instance.
Connect from the SQL editor
Create a new SQL query in the SQL editor.
- Click
Apps in the top right corner and select Lakebase Postgres.
- Click Provisioned to open the Provisioned instances page.
- Select the database instance you want to run PostgreSQL queries on.
- Click New Query in the upper-right.
- To run a read-only query on readable secondaries:
- Click the compute resources drop-down menu and select your compute that has the (Read-only) label.
- Click Switch.
- Select the desired database and schema in the dropdown selector next to Run all.
- Write a PostgreSQL query, and click Run all.
Limitations
- The query access control list (ACL) permissions model applies. Execution happens with the Databricks identity of the user who clicks Run. Anyone with at least CAN VIEW access on the query can see the results as they appear in the SQL Editor.
- Connection-scoped objects such as temporary tables and transactions work in a single cell only. They do not work across different Run clicks, as each is its own session.
- If
$$blocks contain statements that have semicolons, only the results for the last statement are shown.
Connect from SQL clients
You can access a database instance from external tools such as psql, DBeaver, and pgAdmin4.
psqlversion 14 or higher is required. Install it from the PostgreSQL download page. You must also install thelibpqlibrary.- For DBeaver and pgAdmin, see the DBeaver documentation and the pgAdmin documentation.
Connect with psql
- Click
Apps in the top right corner and select Lakebase Postgres.
- Click Provisioned to open the Provisioned instances page.
- Select the database instance you want to access.
- Click Connection details.
- Copy the Connect with PSQL string.
- Paste the command into your terminal and run it.