<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic I built an open-source check that stops AI agents from inventing column names in SQL. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/i-built-an-open-source-check-that-stops-ai-agents-from-inventing/m-p/170570#M56319</link>
    <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;python -m schema_guard.cli snapshot --databricks samples -o .schema-guard/databricks-samples.json&lt;BR /&gt;# wrote .schema-guard\databricks-samples.json: 9 tables, 277 columns, dialect databricks&lt;/P&gt;&lt;P&gt;python -m schema_guard.cli check "SELECT customerid, first_name FROM samples.bakehouse.sales_customers LIMIT 10"&lt;BR /&gt;# (passes)&lt;/P&gt;&lt;P&gt;python -m schema_guard.cli check "SELECT customer_id, first_name FROM samples.bakehouse.sales_customers LIMIT 10"&lt;BR /&gt;# &amp;lt;sql&amp;gt;: `bakehouse.sales_customers` has no column `customer_id`. Did you mean: `customerid`?&lt;/P&gt;&lt;P&gt;Three things worth calling out for Databricks shops:&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;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.&lt;BR /&gt;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.&lt;/P&gt;&lt;P&gt;Repo and full eval numbers: &lt;A href="https://github.com/idk-arsh/schema-guard" target="_blank"&gt;https://github.com/idk-arsh/schema-guard&lt;/A&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;</description>
    <pubDate>Sun, 04 Oct 2026 23:43:26 GMT</pubDate>
    <dc:creator>idk-arsh</dc:creator>
    <dc:date>2026-10-04T23:43:26Z</dc:date>
    <item>
      <title>I built an open-source check that stops AI agents from inventing column names in SQL.</title>
      <link>https://community.databricks.com/t5/data-engineering/i-built-an-open-source-check-that-stops-ai-agents-from-inventing/m-p/170570#M56319</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;python -m schema_guard.cli snapshot --databricks samples -o .schema-guard/databricks-samples.json&lt;BR /&gt;# wrote .schema-guard\databricks-samples.json: 9 tables, 277 columns, dialect databricks&lt;/P&gt;&lt;P&gt;python -m schema_guard.cli check "SELECT customerid, first_name FROM samples.bakehouse.sales_customers LIMIT 10"&lt;BR /&gt;# (passes)&lt;/P&gt;&lt;P&gt;python -m schema_guard.cli check "SELECT customer_id, first_name FROM samples.bakehouse.sales_customers LIMIT 10"&lt;BR /&gt;# &amp;lt;sql&amp;gt;: `bakehouse.sales_customers` has no column `customer_id`. Did you mean: `customerid`?&lt;/P&gt;&lt;P&gt;Three things worth calling out for Databricks shops:&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;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.&lt;BR /&gt;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.&lt;/P&gt;&lt;P&gt;Repo and full eval numbers: &lt;A href="https://github.com/idk-arsh/schema-guard" target="_blank"&gt;https://github.com/idk-arsh/schema-guard&lt;/A&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2026 23:43:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-built-an-open-source-check-that-stops-ai-agents-from-inventing/m-p/170570#M56319</guid>
      <dc:creator>idk-arsh</dc:creator>
      <dc:date>2026-10-04T23:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: I built an open-source check that stops AI agents from inventing column names in SQL.</title>
      <link>https://community.databricks.com/t5/data-engineering/i-built-an-open-source-check-that-stops-ai-agents-from-inventing/m-p/170629#M56326</link>
      <description>&lt;P&gt;Thanks for sharing this. In high level, it is a tool for the agent which will validate the schema and take an action. One question how do we maintain the freshness of the schema, for an example if there is any change in the column name or data type, how do we sync it . I am thinking from databricks prospective, we can create a tool which will directly take the meat data from information schema and design the sql.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2026 12:48:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-built-an-open-source-check-that-stops-ai-agents-from-inventing/m-p/170629#M56326</guid>
      <dc:creator>Sanjeeb2024</dc:creator>
      <dc:date>2026-10-05T12:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: I built an open-source check that stops AI agents from inventing column names in SQL.</title>
      <link>https://community.databricks.com/t5/data-engineering/i-built-an-open-source-check-that-stops-ai-agents-from-inventing/m-p/170672#M56333</link>
      <description>&lt;P&gt;Thanks Sanjeeb, good question.&lt;/P&gt;&lt;P&gt;Freshness is handled a few ways depending on the team. The one I use is a pre-commit hook that re-runs the snapshot when anything under migrations or dbt/models changes, so the JSON moves in the same PR&lt;BR /&gt;as the DDL. For dbt teams, dbt docs generate already writes catalog.json and schema-guard reads it directly.&lt;/P&gt;&lt;P&gt;Your info_schema idea works too, I tried it first. What pushed me off it was agent-side credentials, warehouse cost per check, and no audit trail. The snapshot trades freshness for those three.&lt;/P&gt;&lt;P&gt;A --live flag that cross-checks the snapshot against information_schema and warns on drift is on my list.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2026 00:43:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-built-an-open-source-check-that-stops-ai-agents-from-inventing/m-p/170672#M56333</guid>
      <dc:creator>idk-arsh</dc:creator>
      <dc:date>2026-10-06T00:43:25Z</dc:date>
    </item>
  </channel>
</rss>

