Skip to content
Data
Skill

/databricks-lakebase

Databricks Lakebase Postgres: projects, scaling, connectivity, Lakebase synced tables, and Data API. Use when asked about Lakebase databases, OLTP storage, or connecting apps to Postgres on Databricks.

From plugin
databricks-agent-skills
40738 skills4 commands3 hooks

Claude Code

$ npx -y skills add databricks/databricks-agent-skills --skill databricks-lakebase --agent claude-code

SKILL.md

databricks-lakebase.SKILL.md
name: databricks-lakebase
description: "Databricks Lakebase Postgres: projects, scaling, connectivity, Lakebase synced tables, and Data API. Use when asked about Lakebase databases, OLTP storage, or connecting apps to Postgres on Databricks."
compatibility: Requires databricks CLI (>= v0.294.0)
metadata:
  version: "0.2.0"
parent: databricks-core

Lakebase Postgres Autoscaling

**FIRST**: Use the parent `databricks-core` skill for CLI basics, authentication, and profile selection.

Lakebase is Databricks' serverless Postgres-compatible database, available on AWS and Azure (GA) and on GCP (Beta). It provides fully managed OLTP storage with autoscaling, branching, and scale-to-zero.

**Regions:** Lakebase runs only in the commercial regions listed in [Region availability](https://docs.databricks.com/oltp/projects/manage-projects#availability) (check the page for the user's cloud). It isn't available on AWS GovCloud, and the Azure list has no Azure Government or Azure China regions. If the workspace is in one of these clouds or an unlisted region, tell the user that Lakebase isn't available there. Don't try to create a project.

> **Provisioned Lakebase no longer exists. Never create it.** The old Provisioned tier (static, non-scalable Postgres; `databricks database` CLI / `w.database` SDK) is being migrated to Autoscaling over summer 2026, with no customer action required. Lakebase today is Autoscaling-only (`databricks postgres` / `w.postgres`). Do not attempt to create Provisioned instances; if a user asks for one, tell them Provisioned instances don't exist anymore and point them to Autoscaling. Treat the legacy `database` resource key in app configs as retired, and migrate to the `postgres` resource key. For the legacy DAB `synced_database_tables` resource, use the `postgres_synced_tables` bundle resource or the `databricks postgres create-synced-table` CLI flow instead (see the Common Issues row and `references/synced-tables.md`).

For context when reading older configs or docs, here is how the retired Provisioned tier maps to Autoscaling:

| Aspect | Provisioned (retired) | Autoscaling (current) | |--------|-----------------------|-----------------------| | CLI group | `databricks database` | `databricks postgres` | | Top-level resource | Instance | Project | | Capacity | CU_1–CU_8 (16 GB/CU) | 0.5–112 CU (2 GB/CU) | | Branching | Not supported | Full support | | Scale-to-zero | Not supported | Configurable | | HA | Readable secondaries | 1–3 secondaries + read replicas | | Data API | Not available | PostgREST HTTP API | | Cloud | AWS only | AWS and Azure (GA), GCP (Beta) |

**Compliance:** Supports HIPAA, C5, TISAX, or None. Before any PHI goes into Lakebase, apply the HIPAA gate below.

HIPAA Gate (PHI)

HIPAA coverage comes from the workspace: the compliance security profile with the HIPAA standard, plus a Business Associate Agreement. Confirm both with the user before PHI goes in. Then:

  • **Preview features:** do not use a Preview or Beta feature (for example, Lakehouse Sync) for PHI unless it is listed for your region in [Regional support for features](https://docs.databricks.com/aws/en/security/privacy/hipaa). Check the list each time.
  • **Existing projects:** a project that was running when HIPAA was turned on has no HIPAA audit logging until its compute restarts. Databricks does not restart it for you. Restart each compute.
  • **No PHI in metadata:** never put PHI in database, schema, table, column, or role names, in tags, or in other customer-defined fields. These appear in audit logs and system metadata, and Databricks cannot remove them later.
  • **No PHI in SQL text:** pass PHI values as query parameters, never as literals. Audit logs record statement text.
  • **No PHI in logs or tickets:** keep PHI out of app logs, error messages, screenshots, diagnostic output, and support requests.
  • **Least privilege:** grant each role only the schemas, tables, and operations it needs.

Sources: [HIPAA compliance for Lakebase](https://docs.databricks.com/aws/en/oltp/projects/hipaa-compliance), [Enable HIPAA compliance](https://docs.databricks.com/aws/en/oltp/projects/enable-hipaa-compliance).

Row-Level Security and Data API: Must-Follow Rules

Apply these whenever a design has per-user rows, RLS, or the Data API. Details and tests are in [connectivity.md](references/connectivity.md).

  • **Many end users:** a branch holds at most 500 Postgres roles. Never create one role per app user. The app connects as its service principal over a pool and sets the user per transaction: `SELECT set_config('app.user', $1, true)`.
  • **RLS on a setting:** wrap it in `NULLIF`: `USING (owner_email = (SELECT NULLIF(current_setting('app.user', true), '')))`. On a reused pooled connection, an unset value reads `''`, not NULL. Also run `ALTER TABLE ... FORCE ROW LEVEL SECURITY`, because the table owner bypasses RLS otherwise.
  • **Testing RLS:** never test as the project owner or `databricks_superuser`, and never grant `databricks_superuser` to a teammate for local work. Both bypass RLS. Use a role with only `USAGE` on the app's schema and the table privileges it needs.
  • **Views over RLS tables:** create them `WITH (security_invoker = true)`, and grant the caller `SELECT` on the base table too. A default view checks RLS as its owner, so every caller sees all rows.
  • **Data API before production:** the defaults are open. Empty CORS origins means **all** origins, and empty maximum rows means no limit. Set the exact app origins and a row limit, and expose only the schema built for the API, not `public`.

Capabilities

  • **Project lifecycle** -- create, update, delete Lakebase Postgres Autoscaling projects
  • **Branching** -- copy-on-write branches with TTL, point-in-time recovery, and reset
  • **Compute scaling** -- autoscale 0.5--64 CU, fixed up to 112 CU, scale-to-zero
  • **High availability** -- 1 primary + 1--3 secondaries, automatic failover
  • **PostgreSQL connectivity** -- OAuth token refres
Read more
@databricks
Ships withdatabricks-agent-skills

Build on Databricks with AI coding agents such as Claude Code, Cursor, Codex, GitHub Copilot, and many others. This repository provides the skills and agent plugins for Databricks AI Tools.

Stars on GitHub

Momentum

stars in total
407
Star history of databricks/databricks-agent-skills on GitHub, a chart by star-history.com

Other skills on databricks-agent-skills.

More skills from other plugins.

paddleocr-doc-parsing

paddleocr-doc-parsing

Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…

paddleocr2mo93k
@paddlepaddle@paddlepaddleInstall Skill
context-loader
Auto-invoked

context-loader

Search memories from earlier Pi sessions in this repository. Use it when earlier work may already explain the code, error,…

mem02w69k
@mem0ai@mem0aiInstall Skill
analyzing-ai-citations

analyzing-ai-citations

Answer AI citation and answer engine optimization (AEO) questions in PostHog: whether AI answer engines (ChatGPT, Claude, and an…

posthog3w41k
@posthog@posthogInstall Skill

Questions about databricks-lakebase.

Which coding agents can use databricks-lakebase?
databricks-lakebase installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.