gpt4 book ai didi

处理期间引发 SSAS 表格模型超时

转载 作者:行者123 更新时间:2023-12-04 14:24:16 26 4
gpt4 key购买 nike

当对 Azure 分析服务模型的表格模型执行完整处理时,我在处理 10 分钟后收到以下错误:

Failed to save modifications to the server. Error returned: 'Microsoft SQL: Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.. The exception was raised by the IDbCommand interface.

Technical Details:
RootActivityId: cd0cfc78-416a-4039-a79f-ed7fe9836906
Date (UTC): 2/27/2018 1:25:58 PM
The command has been canceled.. The exception was raised by the IDbCommand interface.
The command has been canceled.. The exception was raised by the IDbCommand interface.
The command has been canceled.. The exception was raised by the IDbCommand interface.
The command has been canceled.. The exception was raised by the IDbCommand interface.

模型的数据源是 Azure 数据仓库,SSAS 通过 SQL 身份验证对其进行身份验证。当超时发生时,一些分区已经检索了它们的所有行,但其他分区仍在处理。该模型包含 11 个表,每个表都有一个分区。

我在使用 Visual Studio 2015 和 SSMS 2017 进行处理时都遇到了错误。我看不到任何具有 10 分钟(600 秒)超时的 SSAS 服务器属性。单独的表处理可以在没有超时问题的情况下完成,因为它们都在 10 分钟内单独完成。

我尝试在我的表格模型脚本语言 json 文件(即 Model.bim)中的 dataSources.connectionDetails 对象中设置 timeout 属性。但是编辑它会删除身份验证凭据,然后重置凭据会删除 timeout 属性。所以我不知道该属性是否与超时错误问题有关。

我正在使用的分区查询表达式示例:

let
Source = #"SQL/resourcename database windows net;DatabaseName",
MyQuery =
Value.NativeQuery(
Source,
"SELECT * FROM [dbo].[MyTable]"
)
in
MyQuery

最佳答案

感谢 GregGalloway 的提示,我发现可以使用 Power Query M 语言在每个分区的基础上设置超时。

所以我的 TMSL 对象的数据访问部分现在看起来像这样......

model.dataSource 是这样的:

"dataSources": [
{
"type": "structured",
"name": "MySource",
"connectionDetails": {
"protocol": "tds",
"address": {
"server": "serverName.database.windows.net",
"database": "databaseName"
},
"authentication": null,
"query": null
},
"options": {},
"credential": {
"AuthenticationKind": "UsernamePassword",
"Username": "dbUsername",
"EncryptConnection": true
}
}
]

各个分区查询也是如此(注意 CommandTimeout 参数):

let
Source = Sql.Database("serverName.database.windows.net","databaseName",[CommandTimeout=#duration(0, 2, 0, 0)]),
MyQuery =
Value.NativeQuery(
Source,
"SELECT * FROM [dbo].[MyTable]"
)
in
MyQuery

现在我为分区查询明确设置了 2 小时的超时。

关于处理期间引发 SSAS 表格模型超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49011023/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com