我通过导入数据库,在 Visual Studio 2019 中使用目标作为 Azure SQL 数据仓库创建了一个数据库项目。当我单击“构建”时,它会抛出物化 View 错误
Error: SQL71640: COUNT_BIG(a) is required when using this tool to create a materialized view that has SUM(a) in the SELECT list.
由于这已经存在于数据仓库中,因此在创建 dacpac 文件时不应产生问题,并且我的脚本中有 COUNT_BIG(*) 。 如果有人遇到类似问题,可以告诉我吗?
最佳答案
我遇到了类似的问题,这是 VS2019 目前的一个功能,并且收到了以下错误:
Severity Code Description Project File Line Suppression State Error SQL71640: Cannot create a materialized view in this tool with COUNT(a). Replace it with COUNT_BIG(a). yourProjectName yourViewName.sql
Severity Code Description Project File Line Suppression State Error SQL71640: COUNT_BIG(a) is required when using this tool to create a materialized view that has SUM(a) in the SELECT list. yourProjectName yourViewName.sql
我今天刚刚更新到版本 16.10.0,但仍然存在问题。简单的解决方法是按照错误提示将任何 COUNT
转换为 COUNT_BIG
。该工具可能将来会更新,因此请密切关注更新。
作为替代方案,您可以开始在部署后脚本(未经测试)中管理物化 View ,但随后您将失去 SSDT 的良好依赖项功能。
如果您对此有强烈的感受,您可以在此处提出反馈项并获得一些赞成票:
https://feedback.azure.com/forums/307516-azure-synapse-analytics
关于当我们在 Visual Studio 2019 中创建 dacpac 文件时,Azure 数据仓库物化 View 出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67738153/