databricks-lakebase-provisioned
Patterns and best practices for Lakebase Provisioned (Databricks managed PostgreSQL) for OLTP workloads.
Skill by ThomazRossito
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/thomazrossito-databricks-lakebase-provisioned
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data, security, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/databricks-lakebase-provisioned
What's inside
- Skill name
databricks-lakebase-provisioned- Description
- Patterns and best practices for Lakebase Provisioned (Databricks managed PostgreSQL) for OLTP workloads. Use when creating Lakebase instances, connecting applications or Databricks Apps to PostgreSQL, implementing reverse ETL via synced tables, storing agent or chat memory, or configuring OAuth authentication for Lakebase.
- License
- MIT
- Instructions
- 349 lines in SKILL.md · view on GitHub
Files (3)
- SKILL.md
- connection-patterns.md
- reverse-etl.md
SKILL.md (first lines)
# Lakebase Provisioned
Patterns and best practices for using Lakebase Provisioned (Databricks managed PostgreSQL) for OLTP workloads.
## When to Use
Use this skill when:
- Building applications that need a PostgreSQL database for transactional workloads
- Adding persistent state to Databricks Apps
- Implementing reverse ETL from Delta Lake to an operational database
- Storing chat/agent memory for LangChain applications
## Overview
Lakebase Provisioned is Databricks' managed PostgreSQL database service for OLTP (Online Transaction Processing) workloads. It provides a fully managed PostgreSQL-compatible database that integrates with Unity Catalog and supports OAuth token-based authentication.
| Feature | Description |
|---------|-------------|
| **Managed PostgreSQL** | Fully managed instances with automatic provisioning |
| **OAuth Authentication** | Token-based auth via Databricks SDK (1-hour expiry) |
| **Unity Catalog** | Register databases for governance |
| **Reverse ETL** | Sync data from Delta tables to PostgreSQL |
| **Apps Integration** | First-class support in Databricks Apps |
**Available Regions (AWS):** us-east-1, us-east-2, us-west-2, eu-central-1, eu-west-1, ap-south-1, ap-southeast-1, ap-southeast-2
## Quick Start
Create and connect to a Lakebase Provisioned instance:
```python
from databricks.sdk import WorkspaceClient
import uuid
# Initialize client
w = WorkspaceClient()
# Create a database instance
instance = w.database.create_database_instance(
name="my-lakebase-instance",
capacity="CU_1", # CU_1, CU_2, CU_4, CU_8
stopped=False
)
print(f"Instance created: {instance.name}")
print(f"DNS endpoint: {instance.read_write_dns}")
```
## Common Patterns
### Generate OAuth Token
```python
from databricks.sdk import WorkspaceClient
import uuid
w = WorkspaceClient()
# Generate OAuth token for database connection
cred = w.database.generate_database_credential(
request_id=str(uuid.uuid4()),
instance_names=["my-lakebase-instance"]
)
token = cred.token # Use this as password in connection string
```
### Connect from Notebook
```python
import psycopg
from databricks.sdk import WorkspaceClient
import uuid
# Get instance details
w = WorkspaceClient()
instance = w.database.get_database_instance(name="my-lakebase-instance")
# Generate token
cred = w.database.generate_database_credential(
request_id=str(uuid.uuid4()),
instance_names=["my-lakebase-instance"]
)
# Connect using psycopg3
conn_string = f"host={instance.read_write_dns} dbname=postgres user={w.current_user.me().user_name} password={cred.token} sslmode=require"
with psycopg.connect(conn_string) as conn:
with conn.cursor() as cur:
cur.execute("SELECT version()")
print(cur.fetchone())
```
### SQLAlchemy with Token Refresh (Production)
For long-running applications, tokens must be refreshed (expire after 1 hour):
```python
import asyncio
import os
import uuid
from sqlalchemy import event
from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession
from sqlalchemy.orm import sessionmaker
from databricks.sdk import WorkspaceClient
# Token refresh state
_current_token = None
_token_refresh_task = None
TOKEN_REFRESH_INTERVAL = 50 * 60 # 50 minutes (before 1-hour expiry)
def _generate_token(instance_name: str) -> str:
"""Generate fresh OAuth token."""
w = WorkspaceClient()
cred = w.database.generate_database_credential(
request_id=str(uuid.uuid4()),
instance_names=[instance_name]
)
return cred.token
async def _token_refresh_loop(instance_name: str):
"""Background task to refresh token every 50 minutes."""From ThomazRossito/data-agents, MIT.
More from ThomazRossito/data-agents
- 0.544score
databricks-execution-compute
ThomazRossito
Execute code and manage compute on Databricks.
SkillCFreshness: C★ 32Claude Code +9 - 0.544score
databricks-spark-declarative-pipelines
ThomazRossito
Creates, configures, and updates Databricks Lakeflow Spark Declarative Pipelines (SDP/LDP) using serverless compute.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-genie
ThomazRossito
Create and query Databricks Genie Spaces for natural language SQL exploration.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-lakebase-autoscale
ThomazRossito
Patterns and best practices for Lakebase Autoscaling (next-gen managed PostgreSQL).
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-vector-search
ThomazRossito
Patterns for Databricks Vector Search: create endpoints and indexes, query with filters, manage embeddings.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-bundles
ThomazRossito
Create and configure Declarative Automation Bundles (formerly Asset Bundles) with best practices for multi-environment deployments (CICD).
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-lakeflow-connect
ThomazRossito
Patterns and best practices for LakeFlow Connect — Databricks native managed ingestion for streaming data from SaaS applications and databases into Unity…
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-ai-functions
ThomazRossito
Use Databricks built-in AI Functions (ai_classify, ai_extract, ai_summarize, ai_mask, ai_translate, ai_fix_grammar, ai_gen, ai_analyze_sentiment…
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-app-python
ThomazRossito
Builds Python-based Databricks applications using Dash, Streamlit, Gradio, Flask, FastAPI, or Reflex.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-jobs
ThomazRossito
Use this skill proactively for ANY Databricks Jobs task - creating, listing, running, updating, or deleting jobs.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-agent-bricks
ThomazRossito
Create and manage Databricks Agent Bricks: Knowledge Assistants (KA) for document Q&A, Genie Spaces for SQL exploration, and Supervisor Agents (MAS) for…
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-model-serving
ThomazRossito
Deploy and query Databricks Model Serving endpoints.
SkillCFreshness: C★ 32Claude Code +9
Signals
- Stars
- 32
- Forks
- 18
- Open issues
- 0
- Last commit (this folder)
- May 5, 2026 (5 months ago)
- Last release
- Apr 18, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ThomazRossito/data-agents
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ThomazRossito
- 0.544score
databricks-spark-declarative-pipelines
ThomazRossito
Creates, configures, and updates Databricks Lakeflow Spark Declarative Pipelines (SDP/LDP) using serverless compute.
SkillCFreshness: C★ 32Claude Code +9 - 0.544score
databricks-execution-compute
ThomazRossito
Execute code and manage compute on Databricks.
SkillCFreshness: C★ 32Claude Code +9 - 0.543score
azure-devops-engineer
ThomazRossito
Playbook operacional do Azure DevOps (Repos, Pipelines, Boards, Artifacts, Test Plans) via MCP oficial microsoft/azure-devops-mcp.
SkillBFreshness: B★ 4Claude Code +9 - 0.539score
databricks-ai-functions
ThomazRossito
Use Databricks built-in AI Functions (ai_classify, ai_extract, ai_summarize, ai_mask, ai_translate, ai_fix_grammar, ai_gen, ai_analyze_sentiment…
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-bundles
ThomazRossito
Create and configure Declarative Automation Bundles (formerly Asset Bundles) with best practices for multi-environment deployments (CICD).
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-vector-search
ThomazRossito
Patterns for Databricks Vector Search: create endpoints and indexes, query with filters, manage embeddings.
SkillCFreshness: C★ 32Claude Code +9
Cite this page
databricks-lakebase-provisioned skill. Agent Mart. https://agentmart.dev/skills/thomazrossito-databricks-lakebase-provisioned (last updated 2026-10-24)