Closed zcecc22 closed 2 months ago
Double checked again with a clean environment and same issue. The tables created have no columnstore.
Can you run dbt debug
and confirm the version.
It was a package version issue. My pyproject.toml referenced dbt-sqlserver-dyvenia as dependency which pointed to version 1.7.3... Not sure if I should be concerned after using this package.
With dbt-sqlserver 1.8.0 no issue
Not sure what the dbt-sqlserver-dyvenia
package is, but the one we publish is just dbt-sqlserver
.
https://docs.getdbt.com/docs/core/connect-data-platform/mssql-setup
I would opt for ours linked above, if it was me.
Materialized tables created with latest stable do not get any columnstore index.
Using as_columnstore: True does not solve the issue either.
Running SQL Server 2022 Developer.
Thanks for your support, Vincent
Model:
SELECT CAST(MATERIAL AS int) AS [Material], CAST(PLANT AS varchar(40)) AS [Plant], CAST(STOR_LOC AS varchar(40)) AS [Storage Location], CAST(DEL_FLAG AS varchar(40)) AS [Deletion Flag], CAST(STRGE_BIN AS varchar(40)) AS [Storage Bin], TRYCAST(REPLACE([-BIC_-ZLABST], ',', '') AS float) AS [Unrestricted Stock], TRYCAST(REPLACE([-BIC_-ZINSME], ',', '') AS float) AS [Quality Inspection Stock], TRYCAST(REPLACE([-BIC_-ZBLCKSTK], ',', '') AS float) AS [Blocked Stock], TRYCAST(REPLACE([-BIC_-ZKLABS], ',', '') AS float) AS [Consignment Unrestricted Stock], TRYCAST(REPLACE([-BIC_-ZKINSM], ',', '') AS float) AS [Consignment Quality Inspection Stock], TRYCAST(REPLACE([-BIC_-ZKSPEM], ',', '') AS float) AS [Consignment Blocked Stock] FROM {{ source('sources', 'bw_mard') }}
dbt_project.yml:
models: sp_dbt_sqlserver:
Config indicated by + and applies to all files under models/example/
packages.yml:
packages: