Skip to content

Commit 8242cc4

Browse files
committed
Fix: sqlfluff templater unsafe_process
1 parent 66bd897 commit 8242cc4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/dbt_core_interface/dbt_templater/templater.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ def _unsafe_process(self, fname, in_str, config=None):
192192
templater_logger.debug(" Node compiled SQL: %r", compiled_sql)
193193

194194
# Adjust for dbt Jinja removing trailing newlines. For more details on
195-
# So for files that have no templated elements in then render_func
196195
# this, see the similar code in sqlfluff-templater.dbt.
197196
compiled_node.raw_sql = source_dbt_sql
198197
# will still be null at this point. If so, we replace it with a lambda

src/dbt_core_interface/project.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5853,7 +5853,8 @@ def run_sql(runners: DbtProjectContainer) -> Union[ServerRunResult, ServerErrorC
58535853
)
58545854

58555855
try:
5856-
result = project_runner.execute_code(query_with_limit)
5856+
run_fn = project_runner.fn_threaded_conn(project_runner.execute_code, query_with_limit)
5857+
result = run_fn()
58575858
except Exception as execution_err:
58585859
return asdict(
58595860
ServerErrorContainer(

0 commit comments

Comments
 (0)