# T-SQL to Databricks Migration Auditor

> Scan SQL Server T-SQL for what breaks on Databricks, get risk-ranked fixes, MERGE rewrites and reconciliation queries.

T-SQL to Databricks Migration Auditor is a free AI agent skill on Agensi by Shrey Kumar Soni, in Data & Databases. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Shrey Kumar Soni](https://www.agensi.io/creators/shrey-kumar-soni)
- Category: [Data & Databases](https://www.agensi.io/skills/data-databases)
- Uses: 1
- Version: 1.0
- Last updated: 2026-10-15
- Security: scan passed (2026-10-15); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/t-sql-to-databricks-migration-auditor
- Tags: database, devops, sql-server, t-sql, databricks, spark-sql, delta-lake, unity-catalog

## About this skill

Migrating SQL Server to Databricks? Most of the pain isn't syntax. It's the code that still runs after conversion but returns different numbers: DATEDIFF boundary counting, case-sensitive joins, CONVERT style codes, time zones, and multi-statement transactions that Delta won't treat as one unit.

This skill gives your agent a repeatable migration-audit workflow:
- **Scans** `.sql` files and folders with a bundled, read-only Python scanner (stdlib only, no installs). It covers 41 T-SQL patterns and reports file:line evidence and severity.
- **Triages** each object as mechanical, review, or redesign, so you can scope the work honestly.
- **Rewrites** high-risk objects set-based: cursors and WHILE loops become window functions, UPDATE…FROM becomes MERGE INTO, #temp tables become temp views, and dbo maps to Unity Catalog. Every behaviour change is marked with `-- VERIFY:`.
- **Reconciles** with matching source and target queries for row counts, key uniqueness, null and sum profiles, and SHA-256 row hashes.

Built by a data engineer who has done SQL Server → Databricks Delta migrations in production.

**What it won't do:** connect to any database, run SQL, edit your files, or convert SSIS packages.

## Requires

- Python 3

## Known limitations

Does not connect to any database, run SQL, edit your files, or convert SSIS packages (SSIS/SSRS out of scope; it only lists embedded SQL). The scanner is regex-based and can give false positives (e.g. `+` in arithmetic flagged as concatenation); the agent confirms each finding in context.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the T-SQL to Databricks Migration Auditor skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Does it run my SQL?

No. It's read-only, and it generates queries for you to run.

### Does it replace Lakebridge or the Databricks code converter?

No. Use those for bulk conversion. This skill audits the code before and after conversion, explains the risky parts, and gives you reconciliation checks.

### Is the scanner perfect?

No. It's regex-based and can give false positives (for example, `+` in arithmetic flagged as concatenation). The agent confirms each finding in context.

### SSIS / SSRS?

Out of scope. It only lists any SQL embedded in them.

### Which agents?

Any agent that supports the SKILL.md standard and can run Python 3 (Claude Code, Cursor, Codex, Gemini CLI).

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
