Snowflake: ALTER CORTEX SEARCH SERVICE ... REFRESH is unparsable
Author: kovaacsCreated Sep 25, 2026Updated Sep 25, 2026
Labelssnowflake
Search before asking
- I searched the issues and found no similar issues.
What Happened
The Snowflake dialect fails to parse the REFRESH form of ALTER CORTEX SEARCH SERVICE, which triggers a manual refresh of the search index (Snowflake docs):
ALTER CORTEX SEARCH SERVICE [ IF EXISTS ] <name> REFRESHAlterCortexSearchServiceStatementSegment covers SUSPEND/RESUME, SET, RENAME TO and ADD/DROP SCORING PROFILE, but not REFRESH.
Expected Behaviour
The statement parses as an alter_cortex_search_service_statement.
Observed Behaviour
==== parsing violations ====
L: 1 | P: 1 | PRS | Line 1, Position 1: Found unparsable section: 'ALTER CORTEX SEARCH
| SERVICE mysvc REFRES...'
WARNING: Parsing errors found and dialect is set to 'snowflake'. Have you configured your dialect correctly?Because the file contains an unparsable section, sqlfluff fix also skips every other fix in that file.
How to reproduce
test.sql:
ALTER CORTEX SEARCH SERVICE mysvc REFRESH;sqlfluff parse test.sqlDialect
snowflake
Version
sqlfluff, version 4.3.0 Python 3.12.14
Configuration
.sqlfluff:
[sqlfluff]
dialect = snowflakeAre you willing to work on and submit a PR to address the issue?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Source: sqlfluff/sqlfluff