Datavault-UK / automate-dv

A free to use dbt package for creating and loading Data Vault 2.0 compliant Data Warehouses (powered by dbt, an open source data engineering tool, registered trademark of dbt Labs)
https://www.automate-dv.com
Apache License 2.0
478 stars 114 forks source link

[BUG] When database (MS SQLServer) has case sensitive collation SQL_Latin1_General_CP1_CS_AS the Latest_open cte table is not found because incorrect capital letter #182

Closed koillinengit closed 1 year ago

koillinengit commented 1 year ago

Describe the bug When database (sqlserver) has case sensitive collation SQL_Latin1_General_CP1_CS_AS the Latest_open cte table is not found because incorrect capital letter

Environment

dbt version: 1.2.4 dbtvault version: 0.9.3 Database/Platform: Sqlserver

To Reproduce Steps to reproduce the behavior:

  1. dbt run
  2. See error: ('42S02', "[42S02] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid object name 'Latest_open'. (208) (SQLExecDirectW)")

Expected behavior Dbt run command for effectivity satellites should go without errors even if database has case sensitive collation: SQL_Latin1_General_CP1_CS_AS instead of case insensitive SQL_Latin1_General_CP1_CI_AS

Screenshots image

Log files ('42S02', "[42S02] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid object name 'Latest_open'. (208) (SQLExecDirectW)")

Additional context Add any other context about the problem here.

DVAlexHiggs commented 1 year ago

dbtvault does not currently support Azure Synapse, only the following are supported:

Please our documentation for more details.

Because we do not yet support Synapse, you will get unpredictable behavior such as this.

Until we add Azure Synapse support, you may extend dbtvault and add in Azure Synapse specific code yourself.

Please see the dbt docs for more info on this as well.

This is quite a simple fix from our side and if it's already working other than this, then we can add this in the next update. The capital 'L' is not intended so it should be changed. Thanks for this report.

koillinengit commented 1 year ago

The same issue is in MS SQLServer

koillinengit commented 1 year ago

In the snowflake version this seems to be fixed (which is case sensitive by default), but not in thisSQLserver version... image

DVAlexHiggs commented 1 year ago

In the snowflake version this seems to be fixed (which is case sensitive by default), but not in thisSQLserver version... image

Thank you. We'll get this fixed in the next release. Must have slipped through QC!

DVAlexHiggs commented 1 year ago

Hi! Fixed in 0.9.5. Thanks for your patience.