Closed M4Al closed 2 weeks ago
I'm searching for relevant snippets in your repository. If this is your first time using Sweep, I'm indexing your repository, which will take a few minutes.
[!TIP] To recreate the pull request, edit the issue title or description.
This is probably a bug in dbt-fabric. Please raise it there. We reuse the dbt show
feature for query execution.
Expected behavior
The query runner should ignore the Jinga comment and generate a valid SQL in the backend.
Actual behavior
Correct SQL generated
Steps To Reproduce
Take any dbt model and add a comment line as the first line
When using the Execute dbt SQL feature this query is generated:
when I remove the comment, the correct SQL is generated.
Log output/Screenshots
I presume the query execute feature checks if the query needs to be encapsukatedby checking if the first line/word is 'with' to detect a CTE.
This check either needs to be done after the Jinga template resolution or be more robust.
Operating System
Windows 11
dbt version
1.8.0
dbt Adapter
dbt-fabric-1.8.3
dbt Power User version
0.39.12
Are you willing to submit PR?