What problem does it solve? Migrating Microsoft SQL Server stored procedures to Databricks is error-prone: procedural T-SQL constructs like cursors, temp tables, transactions, and dynamic SQL have no direct Spark equivalents, and naive conversions introduce SQL injection vulnerabilities and semantic bugs. This Skill provides a structured, security-first conversion workflow that preserves business logic while producing maintainable PySpark code. ## Core Features & Use Cases - Full T-SQL Coverage: Converts DML (INSERT, UPDATE, DELETE, MERGE), DDL, DRL/permissions, joins, CTEs, subqueries, set operators, window functions, temp tables, cursors, transactions, error handling, and dynamic SQL. - Security-First Rules: Enforces seven mandatory rules against SQL injection, including DataFrame API filtering, typed temp views, identifier whitelisting, and Spark-native timestamp functions. - Production Output Contract: Generates reusable Python functions with dry_run support, table_map abstraction, structured return metadata, validation plans, and risk documentation. - Use Case: Given a legacy SQL Server procedure that merges staging data into a customer table with TRY/CATCH and @@ROWCOUNT logging, produce an equivalent Delta Lake MERGE function with Python exception handling, explicit row-count metrics, and a differential validation plan. ## Quick Start Ask the agent to convert your MSSQL stored procedure to Databricks PySpark by pasting the T-SQL source code and requesting a production-ready Python function with a validation plan.