Skip to main content

How do I get started with Lakebase?

Summary

  • Lakebase is a fully managed, serverless Postgres database built into Databricks and is generally available. If you know Postgres, you already know how to use it.
  • The fastest path: create a Lakebase database, connect with any standard Postgres client using your Databricks identity, then create tables and start writing data.
  • To serve lakehouse data to an app or agent, create synced tables that bring Unity Catalog tables into Postgres for low-latency reads.
  • Register your Lakebase database in Unity Catalog to govern it centrally and join operational tables with Delta tables in one query.
  • Lakebase is built on Neon, now part of Databricks, which brings serverless autoscaling, scale-to-zero, and instant copy-on-write branching for development and testing.

How do I get started with Lakebase?

The quickest way to start is to create a Lakebase database in your Databricks workspace, connect to it with any standard Postgres client, and begin creating tables. Lakebase is generally available and speaks the standard Postgres wire protocol, so psql, common GUI clients, and your existing Postgres drivers and frameworks work without changes. From there you can sync tables from your lakehouse for low-latency reads and register the database in Unity Catalog for governance. You don't provision or patch servers: compute is serverless and scales on demand.

What is Lakebase?

Lakebase is a fully managed Postgres database integrated into the Databricks platform for transactional (OLTP) workloads that sit next to your lakehouse data. It's built on Neon, the serverless Postgres engine now part of Databricks, which separates stateless Postgres compute from a durable storage layer. That separation is what gives Lakebase serverless autoscaling, scale-to-zero when idle, and instant copy-on-write branching, so you can create an isolated copy of a database for development or testing without duplicating the underlying data. Because it's part of Databricks, it integrates natively with Unity Catalog governance and with your lakehouse tables.

Getting started in a few steps

The get-started guide walks through the full flow. In short:

Step What you do
1. Create a database Open Lakebase Postgres in your workspace and create a new project. It comes with a production branch and a default database, with serverless compute attached.
2. Connect Select the branch, click Connect, and use the connection string with any Postgres client. Authenticate with your Databricks identity.
3. Create tables Open the SQL editor (or your client) and run standard Postgres statements to create tables and insert data.
4. Sync lakehouse data Create synced tables to bring Unity Catalog tables into Lakebase for low-latency reads.
5. Govern in Unity Catalog Register the database in Unity Catalog to apply central governance and query across sources.

Connect with psql using your Databricks identity, pasting your OAuth token when prompted:

psql 'postgresql://<your-databricks-email>@<host>/databricks_postgres?sslmode=require'

For applications and CI, generate a scoped, short-lived credential with the Databricks CLI instead of a static password:

databricks postgres generate-database-credential

Synced tables bring lakehouse data into Postgres through a fully managed pipeline. Pick a source Unity Catalog table and a sync mode: Snapshot for a one-time copy, Triggered for scheduled incremental updates, or Continuous to keep the Postgres copy within seconds of the source. This is how you serve fresh, governed lakehouse data to an application or an AI agent with fast reads.
Databricks Apps have built-in connectivity: add Lakebase as an app resource, and Databricks creates a service principal, grants it a matching Postgres role, and injects the connection details as environment variables.

What you can build

Application backends: Use Lakebase as the operational database for a Databricks App or an external service, with Postgres reliability and no servers to manage.
AI agent state and memory: Store conversation state, checkpoints, and user preferences in Postgres, with fast point-in-time recovery for agent workloads.
Serving lakehouse data: Sync features or curated tables from Unity Catalog into Lakebase so apps and agents read them with low latency.
Development and testing: Branch a database instantly to match a git branch, then discard it when you're done, without standing up a new instance.

FAQs

Is Lakebase just Postgres?

It's real Postgres, so your SQL, drivers, and tools work as they do elsewhere. What's added is serverless operation, branching, and native integration with Unity Catalog and the lakehouse.

Do I have to manage database servers?

No. Compute is serverless: it autoscales with demand and scales to zero when idle, so there's nothing to provision or patch.

How do I connect from an application?

Use a standard Postgres driver with a connection string, authenticating with a Databricks identity or a generated short-lived credential. In a Databricks App, add Lakebase as a resource and the connection details are injected for you.

What are synced tables?

Synced tables are managed pipelines that copy Unity Catalog tables into your Lakebase database for low-latency reads. You choose Snapshot, Triggered, or Continuous sync depending on how fresh the data needs to be.

How is Lakebase governed?

Register the database in Unity Catalog to bring it under central governance, with lineage and the ability to join Lakebase tables with Delta tables. Querying Lakebase through Unity Catalog uses a serverless SQL warehouse.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.