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

[Bug] Fabric adapter wrong limit query #10843

Closed
2 tasks done
tabit01 opened this issue Oct 11, 2024 · 3 comments
Closed
2 tasks done

[Bug] Fabric adapter wrong limit query #10843

tabit01 opened this issue Oct 11, 2024 · 3 comments
Labels
bug Something isn't working wontfix Not a bug or out of scope for dbt-core

Comments

@tabit01
Copy link

tabit01 commented Oct 11, 2024

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

Error message showing that the dbt-fabric adapter dispatches wrong query to Fabric Synapse Warehouse

select * from source
limit 5

Expected Behavior

The dispatched query should be

select top 5 *
from ..

Steps To Reproduce

  1. Activate python venv with DBT in PowerShell terminal within VS Code
  2. Run dbt show --select "stg_source__entity.sql"

Relevant log output

with source as (
	    select * from "Warehouse"."dbo"."source_entity"
),
renamed as (
	  select
	     "column name 1"
	  from source
)
select * from renamed
	
	limit 5
11:31:22  Encountered an error:
Runtime Error
	Database Error in model stg_source__entity (models\staging\stg_source__entity.sql)
	  ('42000', "[42000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Incorrect syntax near '5'. (102) (SQLExecDirectW)")

Environment

- OS: Windows 11
- Python: 3.12.7
- dbt:1.8.7

Which database adapter are you using with dbt?

other (mention it in "Additional Context")

Additional Context

from dbt --version

Plugins:
- fabric: 1.8.7

@pmags
Copy link

pmags commented Oct 14, 2024

Downgrading to dbt-core==1.7.18 seems to fix for now

@tabit01
Copy link
Author

tabit01 commented Oct 15, 2024

I was not aware of the different vendors in this scenario, seems that Microsoft is tracking this:

microsoft/dbt-fabric#216

@dbeatty10
Copy link
Contributor

Thanks for reaching out @tabit01 !

Closing this one in favor of microsoft/dbt-fabric#216

@dbeatty10 dbeatty10 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 15, 2024
@dbeatty10 dbeatty10 added wontfix Not a bug or out of scope for dbt-core and removed triage labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix Not a bug or out of scope for dbt-core
Projects
None yet
Development

No branches or pull requests

3 participants