We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1fb40ee commit fa43912Copy full SHA for fa43912
1 file changed
sqlmesh/lsp/reference.py
@@ -134,9 +134,12 @@ def get_model_definitions_for_a_path(
134
with open(file_path, "r", encoding="utf-8") as file:
135
read_file = file.readlines()
136
137
- # Build scope tree to properly handle nested CTEs
138
- query = normalize_identifiers(query.copy(), dialect=dialect)
139
- root_scope = build_scope(query)
+ # Build a scope tree to properly handle nested CTEs
+ try:
+ query = normalize_identifiers(query.copy(), dialect=dialect)
140
+ root_scope = build_scope(query)
141
+ except Exception:
142
+ root_scope = None
143
144
if root_scope:
145
# Traverse all scopes to find CTE definitions and table references
0 commit comments