sdlc-agent-08-sql

Generates SQL views and procedures for Databricks Gold-layer consumption as pipeline stage 8.

1|2|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/TRRaveendra/AI-Agents-Databricks --skill sdlc-agent-08-sql-trraveendra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sdlc-agent-08-sql
Source: https://github.com/TRRaveendra/AI-Agents-Databricks/tree/main/ai-agent-skills/databricks-sdlc-agent-skills/08-sql-agent
Command: npx skills add https://github.com/TRRaveendra/AI-Agents-Databricks --skill sdlc-agent-08-sql-trraveendra

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires databricks-sdk, and includes references (resource) components.

What problem does it solve? In a multi-agent Databricks SDLC pipeline, someone must turn the upstream Data Model and DDL into production SQL artifacts (views, procedures, reconciliation queries) with validated syntax and a machine-readable output contract. This Skill defines Agent 8 of 15, which performs that SQL generation step deterministically and hands a validated artifact to the next agent. ## Core Features & Use Cases - SQL artifact generation: Drafts Gold-layer views, procedures, and reconciliation queries via the Databricks Foundation Model API, then validates syntax with EXPLAIN on a SQL warehouse. - Genie Agents routing: Routes natural-language business questions to the Genie Agents Conversation API instead of hand-writing ad-hoc SQL, recording the generated SQL for traceability. - Contract-disciplined output: Returns JSON matching a strict output contract, writes artifacts to /Volumes/{catalog}/state/artifacts/{ticket}/08_sql-agent/, and logs runs to state.agent_runs. - Use Case: A ticket arrives with a data model from Agent 6; this agent produces validated sql/*.sql files, upserts artifact metadata, and signals the Data Quality Agent to continue. ## Quick Start Given the data model and DDL artifacts for ticket 1234, generate and validate the Gold-layer SQL views and write them to the ticket's 08_sql-agent artifact folder.

Frequently Asked Questions about sdlc-agent-08-sql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate SQL views from a data model in Databricks?

Call the Databricks Foundation Model API (e.g., databricks-claude-sonnet-4-5) with the data model and DDL as context to draft the SQL, then validate syntax by running EXPLAIN on a SQL warehouse before persisting the scripts.

Can Genie Code be called from an API or orchestration job?

No. Genie Code is UI-only with no public REST or SDK endpoint, so headless orchestrators cannot invoke it. Use the Foundation Model API or a Mosaic AI Agent endpoint for code generation instead.

When should I use the Genie Agents Conversation API instead of writing SQL?

Use it when the requirement is answering a natural-language business question from data rather than shipping a persisted view. Record the conversation_id and generated SQL for traceability and citations.

What happens when the SQL agent output fails contract validation?

The agent gets one repair retry with the validation error appended to its context. If it still fails, the run is routed to state.needs_human for the approval-gate agents to review.

What authentication does the Genie Conversation API require?

Use OAuth M2M with a service principal for unattended jobs; PAT is acceptable only for local testing. The principal needs CAN USE on the SQL warehouse backing the Genie Space plus access to the underlying Unity Catalog tables.