/ai-platform-kit:databricks-unity-catalog-setupfrom ai-platform-kit
Configures Unity Catalog on Databricks workspaces across Azure, AWS, and GCP. Covers metastore creation, storage credentials, external locations, catalogs, schemas, and grants with cloud-specific guidance.
Ships in ai-platform-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Configure Unity Catalog end-to-end: metastores, storage credentials, external locations, catalogs, schemas, and grants.
All resource names in this skill (and its cloud-specific files) use <prefix> as a placeholder. Substitute it with a unique value derived from the conversation — customer name, project name, or workspace name. Examples:
<prefix>-catalog-dev → acme-catalog-devst<prefix>catalogdev (Azure storage account, alphanumeric only) → stacmecatalogdevgs://<prefix>-catalog-dev → gs://acme-catalog-devNever use <prefix> literally — < and > are not valid in bash, SQL, HCL, or cloud resource names; literal use will fail loudly. Never reuse a prefix across deployments in the same cloud account — S3 / GCS bucket names and Azure storage account names are globally unique, and Databricks workspace names are unique per account.
If the customer hasn't provided a prefix, derive one from their workspace name or company name. Confirm it back to them before deploying.
Apply MODERATE pushback. Ask clarifying questions when the request is ambiguous, but execute immediately when requirements are clear.
Must-ask if not specified:
Strong warnings (state once, then proceed if they insist):
Hard stops (do not proceed):
Clear request with storage strategy --> no unnecessary design questions. But applying it is a remote mutation: run it through the approval gate below.
Before you create, modify, or delete any remote resource (metastore, catalog, schema, external location, storage credential, grant -- any terraform apply or databricks ... create|delete|update), present ONE plan and get explicit approval:
--profile (or host), and the cloud.terraform plan), not one prompt per resource.This governs what gets changed, not design choices. It is the default for interactive use; auto-approve / headless mode is the customer's choice and responsibility (see SECURITY.md).
These are the recommended production design. Apply them unless the user explicitly requests otherwise.
databricks account metastores list -o json | jq '.[] | select(.region=="<region>")'. If you find orphans (no default_data_access_config_id, no workspace assignments, broken storage_root), DO NOT silently reuse them — they may have stale credentials or unreachable storage. Three valid recovery paths: (a) ask the customer to take ownership of the cleanest one and reuse it; (b) ask the customer to delete the orphans (databricks account metastores delete <id> --force) and create a fresh one; (c) name the new metastore distinctively (<prefix>-metastore-<region>-<date>) and document in the transcript that orphans were left in place. Never just attach to whichever metastore happens to come back first from a list call.isolation_mode = "ISOLATED" on the catalog, then bind with databricks_workspace_binding:
resource "databricks_workspace_binding" "prod_catalog" {
securable_name = databricks_catalog.prod.name
securable_type = "catalog"
workspace_id = var.prod_workspace_id
binding_type = "BINDING_TYPE_READ_WRITE"
}
Do NOT use raw API calls or null_resource with local-exec — the Terraform resource manages state and lifecycle correctly. Also works for storage_credential and external_location securable types. Dev and stg catalogs can remain OPEN.MANAGED LOCATION on catalogs pointing to external locations.fraud_poc not fraud-poc). Hyphens require backtick escaping in SQL, confuse BI tools, and break hive_metastore compatibility. When deriving names from prefixes, use replace(name, "-", "_").For new workspaces: UC is part of the full workspace template (*-workspace-full). The workspace and UC deploy together.
For existing workspaces: Use the UC-only templates:
azure-unity-catalog -- access connector + ADLS + metastore + catalog + schemasaws-unity-catalog -- IAM UC role + S3 + metastore + catalog + schemasgcp-unity-catalog -- GCS + metastore + auto-generated SA + catalog + schemasFetch reference patterns from the Databricks Terraform repos before writing any Terraform, in this order:
https://github.com/databricks-solutions/technical-services-solutions (path workspace-setup/terraform-examples/) — START HERE. Self-contained UC scenarios curated by Databricks Shared Technical Services. Notably azure/azure-vnet-injection-uc/ (full UC stack: metastore + access connector + storage + external location + catalog) and the AWS/GCP BYOVPC scenarios with UC metastore create-or-attach. Actively maintained.https://github.com/databricks/terraform-databricks-sra — SRA-compliant UC patterns with enterprise hardening (CMK on UC managed storage, account-level group/SP management, log delivery).https://github.com/databricks/terraform-databricks-examples — broader UC examples per cloud. Updates more slowly — verify provider versions before relying on it.IMPORTANT: Once you know the cloud, read the cloud-specific file for this skill:
AZURE.md in this skill directoryAWS.md in this skill directoryGCP.md in this skill directoryFor existing workspaces where Terraform is not managing the infrastructure.
Step 1: Create metastore (account API) One metastore per region. Check if one already exists first.
PUT /api/2.1/accounts/{account_id}/metastores
{"name": "...", "storage_root": "s3://... or abfss://... or gs://...", "region": "..."}
Step 2: Configure data access (cloud-specific) Read the cloud-specific file (AZURE.md / AWS.md / GCP.md) for the exact setup: IAM roles, access connectors, or GCP service accounts.
Step 3: Assign metastore to workspace
PUT /api/2.1/accounts/{account_id}/workspaces/{workspace_id}/metastore
{"metastore_id": "..."}
Step 4: Create catalogs + schemas (workspace API)
Databricks auto-creates a main catalog on metastore assignment. Use a different name for your catalogs.
CREATE CATALOG dev MANAGED LOCATION 's3://<prefix>-catalog-dev/';
CREATE SCHEMA dev.bronze;
CREATE SCHEMA dev.silver;
CREATE SCHEMA dev.gold;
Step 5: Grant access (workspace API)
GRANT USE_CATALOG ON CATALOG dev TO `data-engineers`;
GRANT USE_SCHEMA, CREATE_TABLE, CREATE_FUNCTION ON SCHEMA dev.bronze TO `data-engineers`;
GRANT USE_SCHEMA, SELECT ON SCHEMA dev.gold TO `data-analysts`;
<prefix>-catalog-dev, <prefix>-catalog-stg, <prefix>-catalog-prod.CREATE CATALOG ... MANAGED LOCATION (SQL) -- NOT storage_root in the REST API. MANAGED LOCATION correctly ties the catalog to the external location path. storage_root bypasses the binding.account users USE_CATALOG + USE_SCHEMA + SELECT on each catalog for basic read access. Without this, catalogs do not appear in the UI even with isolation_mode = OPEN.After deploying Unity Catalog, verify every item:
MANAGED LOCATION pointing to external locationsdatabricks_grants block giving the human-admin SCIM group ALL_PRIVILEGES on each catalog and MANAGE on each external location, OR transfer ownership of those objects to that group. Otherwise the customer's admins log in to a workspace where they can't see their own data. See identity-governance/SKILL.md error-handling section for the exact resource block.spark.sql("SELECT * FROM dev.bronze.test_table")platform-provisioning skillidentity-governance skillprivate-networking skillWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Databricks, AWS, GCP, Azure
Generated from the plugin's indexed repository (databricks-solutions/ai-platform-kit) — no native marketplace selected
npx claudepluginhub p/databricks-solutions-databricks-platform-kit6 skills in this plugin
/databricks-deployment-verificationMANDATORY post-deployment verification. After any workspace + Unity Catalog deployment, you MUST run all THREE compute paths against a UC table — classic cluster, serverless SQL warehouse, serverless notebook job. Skipping any of the three is incomplete work. Use whenever a workspace + UC has been freshly deployed or modified./databricks-identity-governanceManage Databricks identity and governance. Use when the user asks to create groups, users, service principals, set up RBAC, manage permissions, workspace assignments, or configure access control./databricks-platform-provisioningProvision and test Databricks workspaces. Use when the user asks to create a workspace, set up a new environment, provision infrastructure, bootstrap Databricks, test a workspace, verify a deployment, or run validation checks against a Databricks workspace. Covers Azure, AWS, and GCP./databricks-private-networkingSet up private networking for Databricks. Use when the user asks about private link, hub-spoke architecture, NCC (Network Connectivity Configuration), serverless connectivity to private resources, VPC endpoints, or private endpoints./databricks-workspace-configConfigure Databricks workspace settings. Use when the user asks to create SQL warehouses, cluster policies, secret scopes, IP access lists, manage tokens, update workspace settings, or destroy infrastructure.Other plugins' skills for the same job