Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run query which end with a single comment #1279

Open
1 task
ndeunk opened this issue Jul 5, 2024 · 1 comment
Open
1 task

Unable to run query which end with a single comment #1279

ndeunk opened this issue Jul 5, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ndeunk
Copy link

ndeunk commented Jul 5, 2024

Expected behavior

Be able to run a query which ends with a single comment

Actual behavior

Incorrect syntax error

Steps To Reproduce

Create simple model. For example:

select * from {{ source('bronze', 'my_test_table') }} -- My new comment

The genereated SQL has an additional statement on the same line as the comment, causing the error.

select * from renamed -- My new comment order by (select null)
    offset 0 rows fetch first 500 rows only

Log output/Screenshots

('42000', "[42000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Incorrect syntax near '0'. (102) (SQLExecDirectW)")

Operating System

Debian GNU/Linux 11 (bullseye)

dbt version

1.8.3

dbt Adapter

fabric

dbt Power User version

v0.41.4

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@ndeunk ndeunk added the bug Something isn't working label Jul 5, 2024
@mdesmet
Copy link
Contributor

mdesmet commented Jul 10, 2024

@ndeunk : Are you able to run this query with dbt show?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants