What problem does it solve? When Cortex Analyst generates incorrect SQL from a Snowflake semantic view, this Skill diagnoses the root cause, applies targeted optimizations to the semantic view YAML, and validates that the fixed SQL produces correct results. ## Core Features & Use Cases - Issue Diagnosis: Generates SQL from problematic natural language questions using Cortex Analyst to reproduce failures. - Root Cause Analysis: Maps SQL errors (missing joins, wrong aggregations, incorrect filters) to specific semantic view gaps like missing relationships, metrics, or synonyms. - Validated Optimization: Applies approved fixes via semantic_view_set.py, then executes both generated and ground truth SQL to confirm results match exactly. - Use Case: A data engineer finds that Cortex Analyst generates SQL missing a hierarchy table join for a revenue question. This Skill identifies the missing relationship in the semantic view, proposes the fix, and validates the corrected query output. ## Quick Start Debug why my semantic view generates wrong SQL for the question "what is total revenue by region last quarter" and fix it.