vscode-dbt-power-user icon indicating copy to clipboard operation
vscode-dbt-power-user copied to clipboard

Query preview not working for ODBC driver

Open tabit01 opened this issue 1 year ago • 5 comments

Expected behavior

The preview feature should send a valid SQL query to my Fabric Synapse datawarehouse, using the ODBC Driver 18 for SQL Server. Running dbt, debugging, testing works as expected in the warehouse.

Actual behavior

The dispatched query is

select * from <table> limit 500

which is not valid T-SQL

Steps To Reproduce

In settings.json I first tried to set the query template:

"dbt.queryTemplate": "select top {limit} * from ({query}) as query"

I realized that the query template is deprecated, and set the field to blank, reinstalled extension, restarted VS Code etc.

Log output/Screenshots

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

Operating System

Windows 11

dbt version

1.8.7

dbt Adapter

Fabric

dbt Power User version

0.47.0

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

tabit01 avatar Oct 09 '24 10:10 tabit01