Medium severityexecution
Power BI Refresh Error:
CORTEX_ANALYST_QUERY_GENERATION_FAILED
What does this error mean?
Snowflake Cortex Analyst failed to generate or execute a SQL query from a natural-language question, typically because the semantic model is incomplete or the question is outside its coverage.
Common causes
- 1The semantic model YAML is missing table, column, or measure definitions that the question requires
- 2The natural-language question references a concept not mapped in the semantic model
- 3The underlying table or view referenced in the semantic model no longer exists or was renamed
- 4The Cortex Analyst REST API request has an invalid semantic_model_file path in the request body
How to fix it
- 1Step 1: Inspect the error response body — Cortex Analyst returns an error message indicating which part of the query generation failed.
- 2Step 2: Review the semantic model YAML file for missing or incomplete table, column, and measure definitions.
- 3Step 3: Verify that all tables and views referenced in the semantic model exist in Snowflake and are accessible to the role making the request.
- 4Step 4: Test the semantic model by submitting a simple, well-defined question to isolate whether the error is model-level or query-level.
- 5Step 5: Use the Verified Query Repository to add curated example SQL for common question patterns.