I work on data pipelines. The most common way I see Claude Code and Cursor break SQL is dull. They write against the schema they think exists. The README is stale, or they copy `customer_id` from an old query when the real column is `customerid`. The query errors in a dashboard, in CI, or at 2am.
I built schema-guard to catch it before the SQL runs. You snapshot the real tables and columns once (names and types, no data), commit the JSON to the repo, and schema-guard denies the agent's call with the closest real names when it writes something that doesn't exist. It runs as a Claude Code hook, an MCP server, a CI check, or a pre-commit hook.
Today I ran it against a fresh Databricks Free Edition workspace to prove the Unity Catalog path works. One command pulled 9 tables and 277 columns from the samples catalog.
python -m schema_guard.cli snapshot --databricks samples -o .schema-guard/databricks-samples.json
# wrote .schema-guard\databricks-samples.json: 9 tables, 277 columns, dialect databricks
python -m schema_guard.cli check "SELECT customerid, first_name FROM samples.bakehouse.sales_customers LIMIT 10"
# (passes)
python -m schema_guard.cli check "SELECT customer_id, first_name FROM samples.bakehouse.sales_customers LIMIT 10"
# <sql>: `bakehouse.sales_customers` has no column `customer_id`. Did you mean: `customerid`?
Three things worth calling out for Databricks shops:
1. The reader uses information_schema.columns, so any Unity Catalog you can read works the same way. No special permission beyond SELECT on the catalog metadata.
2. The agent never needs warehouse credentials. The snapshot lives in the repo. One person runs schema-guard snapshot after a schema change, commits the JSON, and every agent on every laptop checks against it.
3. It also reads from dbt docs generate (catalog.json), so dbt-on-Databricks teams get the same guarantee without any warehouse connection on the agent side.
Repo and full eval numbers: https://github.com/idk-arsh/schema-guard
I want to hear false blocks on real Databricks SQL. A guard that blocks valid SQL gets uninstalled, so that is the metric that matters most.