Skip to content

Commit bc8b650

Browse files
committedOct 5, 2022
Add language on error nodes
1 parent 86eb68f commit bc8b650

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎core/dbt/parser/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def _mangle_hooks(self, config):
157157
config[key] = [hooks.get_hook_dict(h) for h in config[key]]
158158

159159
def _create_error_node(
160-
self, name: str, path: str, original_file_path: str, raw_code: str, language: str = "sql"
160+
self, name: str, path: str, original_file_path: str, raw_code: str, language: str
161161
) -> UnparsedNode:
162162
"""If we hit an error before we've actually parsed a node, provide some
163163
level of useful information by attaching this to the exception.
@@ -227,7 +227,7 @@ def _create_parsetime_node(
227227
path=path,
228228
original_file_path=block.path.original_file_path,
229229
raw_code=block.contents,
230-
# language=language,
230+
language=language,
231231
)
232232
raise ParsingException(msg, node=node)
233233

‎core/dbt/parser/schemas.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def get_hashable_md(data: Union[str, int, float, List, Dict]) -> Union[str, List
272272
path=path,
273273
original_file_path=target.original_file_path,
274274
raw_code=raw_code,
275-
# language="sql",
275+
language="sql",
276276
)
277277
raise ParsingException(msg, node=node) from exc
278278

0 commit comments

Comments
 (0)