databricks-lakebase-provisioned

Provision and connect to Databricks managed PostgreSQL instances for OLTP workloads.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Setting up a transactional PostgreSQL database on Databricks involves instance provisioning, short-lived OAuth token management, Unity Catalog registration, and reverse ETL configuration, all of which are error-prone when done manually. ## Core Features & Use Cases - Instance Provisioning & Connection: Create Lakebase Provisioned instances (CU_1 to CU_8) and connect via psycopg or SQLAlchemy with automatic OAuth token refresh before the 1-hour expiry. - Reverse ETL: Sync Delta tables from Unity Catalog into PostgreSQL as synced tables with FULL or INCREMENTAL modes for low-latency OLTP access. - Databricks Apps & MLflow Integration: Add Lakebase as an app resource, declare it as an MLflow model resource, and store LangChain agent memory. - Use Case: Build a Databricks App that needs persistent transactional state — provision a Lakebase instance, wire it as an app resource, and connect with a pooled SQLAlchemy engine that refreshes tokens automatically. ## Quick Start Create a Lakebase Provisioned instance named my-lakebase-instance with CU_1 capacity and show me how to connect to it from a notebook.

Frequently Asked Questions about databricks-lakebase-provisioned

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

FAQPage Schema
How do I connect to Lakebase Provisioned from Python?

Connect to Lakebase Provisioned using psycopg3 with an OAuth token generated via the Databricks SDK's generate_database_credential method. Use the instance's read_write_dns as host, your Databricks username, and set sslmode=require in the connection string.

How to sync Delta tables to PostgreSQL with reverse ETL?

Create a synced table using the Databricks SDK's create_synced_table method, specifying the source Unity Catalog table, target table name, and sync mode. Choose FULL for small tables or INCREMENTAL with a change-tracking column for large tables.

Why does my Lakebase connection fail after one hour?

Lakebase OAuth tokens expire after one hour, causing authentication failures in long-running applications. Implement a background token refresh loop that regenerates the token every 50 minutes and injects it into new connections via SQLAlchemy's do_connect event.

Does Lakebase Provisioned work with Databricks Apps?

Yes, Lakebase integrates with Databricks Apps as a first-class resource added via the databricks apps add-resource CLI command. Apps receive configuration through environment variables like LAKEBASE_INSTANCE_NAME and LAKEBASE_DATABASE_NAME.

What is the difference between Lakebase Provisioned and Lakebase Autoscaling?

Lakebase Provisioned uses fixed capacity units (CU_1 through CU_8) and is available in more AWS regions, while Lakebase Autoscaling offers automatic scaling with limited regional availability. This skill covers the Provisioned offering.

Why does DNS resolution fail for Lakebase on macOS?

Python's socket.getaddrinfo fails with long Lakebase hostnames on macOS. Work around it by resolving the hostname with the dig command and passing the resulting IP as the hostaddr parameter to psycopg while keeping the hostname for TLS SNI.