Skip to content

Commit

Permalink
Fix: sqlfluff templater unsafe_process
Browse files Browse the repository at this point in the history
  • Loading branch information
BAntonellini committed Sep 19, 2023
1 parent 66bd897 commit 8242cc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/dbt_core_interface/dbt_templater/templater.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ def _unsafe_process(self, fname, in_str, config=None):
templater_logger.debug(" Node compiled SQL: %r", compiled_sql)

# Adjust for dbt Jinja removing trailing newlines. For more details on
# So for files that have no templated elements in then render_func
# this, see the similar code in sqlfluff-templater.dbt.
compiled_node.raw_sql = source_dbt_sql
# will still be null at this point. If so, we replace it with a lambda
Expand Down
3 changes: 2 additions & 1 deletion src/dbt_core_interface/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -5853,7 +5853,8 @@ def run_sql(runners: DbtProjectContainer) -> Union[ServerRunResult, ServerErrorC
)

try:
result = project_runner.execute_code(query_with_limit)
run_fn = project_runner.fn_threaded_conn(project_runner.execute_code, query_with_limit)
result = run_fn()
except Exception as execution_err:
return asdict(
ServerErrorContainer(
Expand Down

0 comments on commit 8242cc4

Please sign in to comment.