databricks-lakebase-autoscale

Manage Lakebase Autoscaling PostgreSQL projects, branches, computes, and reverse ETL on Databricks.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/AarushiShah/coding-agents-databricks-apps --skill databricks-lakebase-autoscale-aarushishah
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databricks-lakebase-autoscale
Source: https://github.com/AarushiShah/coding-agents-databricks-apps/tree/main/.claude/skills/databricks-lakebase-autoscale
Command: npx skills add https://github.com/AarushiShah/coding-agents-databricks-apps --skill databricks-lakebase-autoscale-aarushishah

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires databricks-sdk, psycopg, sqlalchemy, and includes references (resource) components.

What problem does it solve? Setting up and operating a managed PostgreSQL database on Databricks involves unfamiliar concepts like projects, branches, autoscaling computes, OAuth token rotation, and scale-to-zero behavior. This Skill provides the patterns, SDK calls, CLI commands, and MCP tools needed to provision and operate Lakebase Autoscaling correctly without trial and error. ## Core Features & Use Cases - Project and Branch Management: Create projects, Git-like database branches with TTL expiration, branch protection, and point-in-time restore using the Databricks SDK w.postgres module or CLI. - Compute Autoscaling and Scale-to-Zero: Configure compute endpoints from 0.5 to 112 CU with autoscaling ranges and automatic suspension for cost savings. - Connection Patterns: Production-ready connection pooling with automatic OAuth token refresh, plus workarounds for macOS DNS resolution and scale-to-zero wake-up. - Reverse ETL: Sync Delta tables from Unity Catalog into PostgreSQL via synced tables with Snapshot, Triggered, or Continuous modes. - Use Case: Build a web application backend by creating a Lakebase project, branching a development environment from production, connecting via SQLAlchemy with token refresh, and syncing a product catalog from Delta Lake. ## Quick Start Ask the agent to create a Lakebase Autoscaling project named my-app with Postgres 17 and show how to connect to it from a Python notebook.

Frequently Asked Questions about databricks-lakebase-autoscale

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Lakebase Autoscaling project on Databricks?

Use the Databricks SDK w.postgres.create_project() method with a ProjectSpec containing a display name and Postgres version 16 or 17. It is a long-running operation, so call .wait() on the returned operation. A production branch, default compute, and databricks_postgres database are created automatically.

How do I connect to Lakebase Autoscaling from Python?

Generate an OAuth token with w.postgres.generate_database_credential(), get the host from the endpoint status, and connect with psycopg using sslmode=require. Tokens expire after one hour, so production applications must implement a token refresh loop.

What is the difference between Lakebase Autoscaling and Lakebase Provisioned?

Autoscaling uses the w.postgres SDK module with projects as top-level resources, 0.5-112 CU sizing at 2 GB per CU, branching, and scale-to-zero. Provisioned uses w.database with fixed CU_1 to CU_8 instances at 16 GB per CU and no branching support.

Why does my Lakebase connection fail after idle periods?

Scale-to-zero suspends the compute after the inactivity timeout, and reactivation takes a few hundred milliseconds on the next connection. Implement connection retry logic, and note that session state like temporary tables is lost after reactivation.

How do I sync Delta tables to PostgreSQL with reverse ETL?

Create a synced table with w.database.create_synced_database_table() specifying the source Delta table, primary key columns, and a scheduling policy of Snapshot, Triggered, or Continuous. Triggered and Continuous modes require Change Data Feed enabled on the source table.

What are the limitations of Lakebase Autoscaling?

It does not support readable secondaries for high availability, Feature Store integration, Postgres-to-Delta sync, or direct migration from Lakebase Provisioned. Autoscaling ranges cannot exceed an 8 CU spread, and branches are limited to 500 per project with 8 TB logical size per branch.