Loading...
Loading...
Manage Lakebase Postgres Autoscaling projects, branches, and endpoints via Databricks CLI. Use when asked to create, configure, or manage Lakebase Postgres databases, projects, branches, computes, or endpoints.
npx skill4agent add databricks/databricks-agent-skills databricks-lakebasedatabricksdatabricks postgresProject (top-level container)
└── Branch (isolated database environment, copy-on-write)
├── Endpoint (read-write or read-only)
├── Database (standard Postgres DB)
└── Role (Postgres role)productionprimaryREADYARCHIVEDENDPOINT_TYPE_READ_WRITEENDPOINT_TYPE_READ_ONLYdatabricks_postgresdatabricks postgres create-role -h| Resource | Format |
|---|---|
| Project | |
| Branch | |
| Endpoint | |
| Database | |
Note: "Lakebase" is the product name; the CLI command group is. All commands usepostgres.databricks postgres ...
# List all postgres subcommands
databricks postgres -h
# Get detailed usage for any subcommand (flags, args, JSON fields)
databricks postgres <subcommand> -hdatabricks postgres -hdatabricks postgres <subcommand> -hDo NOT list projects before creating.
databricks postgres create-project <PROJECT_ID> \
--json '{"spec": {"display_name": "<DISPLAY_NAME>"}}' \
--profile <PROFILE>productionprimary--no-waitdatabricks postgres create-project -hpg_versiondatabricks postgres list-branches projects/<PROJECT_ID> --profile <PROFILE>
databricks postgres list-endpoints projects/<PROJECT_ID>/branches/<BRANCH_ID> --profile <PROFILE>
databricks postgres list-databases projects/<PROJECT_ID>/branches/<BRANCH_ID> --profile <PROFILE>create-endpointupdate-endpointdatabricks postgres create-endpoint -hdatabricks postgres create-branch projects/<PROJECT_ID> <BRANCH_ID> \
--json '{
"spec": {
"source_branch": "projects/<PROJECT_ID>/branches/<SOURCE_BRANCH_ID>",
"no_expiry": true
}
}' --profile <PROFILE>"no_expiry": trueupdate-branchspec.is_protectedfalse# Step 1 — unprotect
databricks postgres update-branch projects/<PROJECT_ID>/branches/<BRANCH_ID> \
--json '{"spec": {"is_protected": false}}' --profile <PROFILE>
# Step 2 — delete (run -h to confirm positional arg format for your CLI version)
databricks postgres delete-branch projects/<PROJECT_ID>/branches/<BRANCH_ID> \
--profile <PROFILE>production.nameREADYdatabricks postgres list-branches projects/<PROJECT_ID> --profile <PROFILE>.name<BRANCH_ID>databricks postgres list-databases projects/<PROJECT_ID>/branches/<BRANCH_ID> --profile <PROFILE>lakebasedatabricks apps init --name <APP_NAME> \
--features lakebase \
--set "lakebase.postgres.branch=<BRANCH_NAME>" \
--set "lakebase.postgres.database=<DATABASE_NAME>" \
--run none --profile <PROFILE><BRANCH_NAME>projects/<PROJECT_ID>/branches/<BRANCH_ID><DATABASE_NAME>projects/<PROJECT_ID>/branches/<BRANCH_ID>/databases/<DB_ID>databricks-appsdatabricks postgres get-endpoint projects/<PROJECT_ID>/branches/<BRANCH_ID>/endpoints/<ENDPOINT_ID> --profile <PROFILE>databricks postgres create-role -h # discover role spec fieldsdatabricks postgres create-endpoint projects/<PROJECT_ID>/branches/<BRANCH_ID> <ENDPOINT_ID> \
--json '{"spec": {"type": "ENDPOINT_TYPE_READ_ONLY"}}' --profile <PROFILE>| Error | Solution |
|---|---|
| Use |
| Check workspace permissions |
| Protected branch cannot be deleted | |
| Long-running operation timeout | Use |