Medium severityexecution
Power BI Refresh Error:
CORTEX_SEARCH_QUERY_ERROR
What does this error mean?
A query against a Snowflake Cortex Search Service failed, typically because the service has not finished its initial indexing, the service is suspended, or the query payload is malformed.
Common causes
- 1The Cortex Search Service was created but has not yet completed its first embedding build
- 2The service was paused or suspended due to inactivity or resource constraints
- 3The REST query payload is missing required fields (query, columns, or limit)
- 4The Snowflake role used for the query lacks USAGE privilege on the Cortex Search Service
How to fix it
- 1Step 1: Run SELECT * FROM SNOWFLAKE.INFORMATION_SCHEMA.CORTEX_SEARCH_SERVICES to check the service status.
- 2Step 2: If status is INITIALIZING, wait for the first index build to complete before querying.
- 3Step 3: Verify the calling role has been granted USAGE on the service with GRANT USAGE ON CORTEX SEARCH SERVICE.
- 4Step 4: Validate the REST or Python SDK payload — ensure the query, columns, and limit fields are present and correctly typed.
- 5Step 5: If the service is suspended, resume it with ALTER CORTEX SEARCH SERVICE ... RESUME.