guide5 min read

Claude Code Unity Catalog

Claude Code Unity Catalog

Claude Code integrates with Databricks Unity Catalog through the Unity Catalog API — exposing catalogs, schemas, tables, views, lineage, and access control as first-class agent operations. The agent can grant permissions, trace lineage, and audit catalogs directly from the terminal.

Unity Catalog is the fastest-growing catalog in the industry because it ships with Databricks and now works across non-Databricks compute. Claude Code leverages UC's rich metadata to make safer data engineering decisions — it never touches a table without first checking who uses it.

Why Unity Catalog Plus Claude Code

Unity Catalog centralizes permissions, lineage, and discovery across all data in a Databricks account. That consolidation is exactly what Claude Code needs: a single source of truth for 'who owns what,' 'who has access,' and 'what uses this column.' Every agent action gets the full catalog context before it runs.

The agent also leverages UC's row-level security and column masks. When Claude Code reads data through UC, it automatically respects the masks and RLS policies — so the agent never sees PII it is not supposed to. That makes UC-mediated access dramatically safer than direct warehouse connections.

API Access and Authentication

Unity Catalog exposes a REST API and a SQL interface. Claude Code uses both depending on the operation: SQL for queries and grants, REST API for catalog management and lineage queries. Auth is either personal access tokens or OAuth M2M, stored in your secrets manager rather than the MCP config.

  • Use OAuth M2M — rotatable scoped tokens
  • Scope metastore grants — principle of least privilege
  • Leverage external locations — for cloud storage access
  • Use storage credentials — abstract cloud IAM
  • Audit table access logs — UC tracks everything

Catalog Management

Claude Code can create catalogs, schemas, tables, and views directly via SQL DDL. It respects the catalog hierarchy (catalog → schema → table → column) and applies grants correctly. When the agent creates a new dbt mart, it assigns the right ownership, adds the right tags, and grants access to the downstream groups — all in one command.

For catalog-level policy (e.g., 'all tables in the prod_finance catalog require encryption at rest'), the agent reads the policy and enforces it on every new table. That turns catalog management from reactive chores into proactive policy enforcement.

Lineage and Impact Analysis

Unity Catalog's lineage is column-level for Databricks-native workloads and table-level for external tools. Claude Code leverages both: before a schema change, it queries UC lineage for downstream consumers and flags any dashboards, ML features, or dbt models that would break. Refactors that used to be scary become routine.

WorkflowManualClaude Code + UC
Grant table access5 min per user30 sec
Lineage impact analysis1 hour10 sec
Create new catalog30 min2 min
Audit access logs1 hour1 min
Apply tags and owners30 min30 sec

Row-Level Security and Column Masks

UC's row filters and column masks let you expose sensitive tables without leaking PII. Claude Code can write the filter functions, apply them to tables, and verify the behavior against test queries. It also audits existing RLS policies for correctness — a task most teams skip until a security incident forces it.

See AI for data infra for how UC integrates with Data Workers governance agents, or autonomous data engineering for the continuous policy enforcement pattern.

Cross-Catalog Federation

Unity Catalog now supports federation with Snowflake Polaris, AWS Glue, and HMS. Claude Code can query across all federated catalogs in a single prompt, which makes it the ideal tool for teams running heterogeneous data stacks. Compare this to manual cross-catalog work, which is currently a research project for most teams.

Production Checklist

Before rolling out: OAuth M2M tokens, scoped metastore grants, destructive-action hooks, audit log review. Most teams reach production-ready in a day. Book a demo to see UC, Claude Code, and Data Workers catalog agents running on a live Databricks workspace.

Onboarding a new engineer to this workflow takes hours instead of weeks because the agent already knows the conventions documented in your CLAUDE.md. New hires pair with Claude Code on their first ticket, watch how it reasons about the codebase, and absorb the local patterns faster than any wiki could teach them. That accelerated ramp compounds across every hire you make after the agent is installed.

A surprising second-order effect is that documentation quality goes up across the board. Because the agent reads the catalog, CLAUDE.md, and PR descriptions to do its job, any gap or staleness in those artifacts produces visibly worse output. That feedback loop pressures the team to keep docs honest in ways that a quarterly audit never does. Teams report cleaner catalogs and richer docs within a month of rolling out Claude Code seriously.

The workflow also changes how code review feels. Instead of spending cycles on cosmetic issues (naming, test coverage, doc gaps) reviewers focus on business logic and design tradeoffs. The agent already handled the boring parts of the PR, so reviewers can review at a higher level. Most teams report that PRs merge twice as fast without any reduction in quality — often with higher quality because the mechanical checks are consistent.

Do not underestimate the cultural change either. Some engineers love working with an agent immediately and never want to go back. Others resist it for months. The resistance is usually not technical — it is about identity and craft. Give engineers room to adapt at their own pace, celebrate the early wins publicly, and let the productivity gains speak for themselves. Coercion backfires; invitation works.

Metrics matter for sustaining momentum past the honeymoon. Track a few numbers every week — PR throughput, time-to-resolution on incidents, warehouse spend per analyst, number of agent-opened PRs that merge without edits. These become the scoreboard that justifies continued investment and surfaces any regressions early. The teams that measure the impact keep the integration healthy; teams that just assume it is working drift into disrepair.

Unity Catalog plus Claude Code turns the most widely deployed lakehouse catalog into an agent-first environment. The agent manages permissions, lineage, tags, and RLS with the rigor that most humans skip. For any team on Databricks, it is the highest-leverage integration available.

Go from data platform to
agentic platform.

With autonomous AI agents working across your entire data stack — MCP-native, open-source, deployed in minutes.

Book a Demo →

Related Resources