Skip to content

Function: provisionCacheSchema()

provisionCacheSchema(role, logger?): Promise<void>

Grant role rights on the AppKit cache schema, but only when that schema already exists.

No-ops inside a Databricks App env, when role is undefined, or when the schema is absent. Best-effort otherwise: any failure (e.g. the local identity doesn’t own the schema) is logged and swallowed so it never blocks startup - a disabled cache is degraded, not fatal.

string | undefined

Postgres role to grant to and connect as (the resolved workspace-client identity); skips when undefined.

Logger = defaultLogger

Logger to report progress on. Defaults to this module’s.

Promise<void>

import { provision } from "@dbx-tools/appkit";
await provision.provisionCacheSchema("app-service-principal@databricks.com");