仅刷新某些表/分区时,通过 REST API 调用的 Azure 分析服务异步刷新不起作用

标签 azure azure-analysis-services

我正在尝试通过此处记录的 REST API 刷新分析服务:https://learn.microsoft.com/en-us/azure/analysis-services/analysis-services-async-refresh

当我通过发送此数据对整个模型进行完全刷新时:

{'Type': 'Full', 'CommitMode': 'transactional'}

在 POST 请求中,一切正常。

模型刷新,在轮询状态一段时间后,我终于得到了这个响应:

{'startTime': '2019-12-09T09:50:28.4905312Z', 
 'endTime': '2019-12-09T10:51:21.614713Z', 
 'type': 'full', 
 'status': 'succeeded', 
 'currentRefreshType': 'full', 
 'objects': [
   {'table': 'Advertiser', 'partition': 'Partition', 'status': 'succeeded'}, 
   ...
   {'table': 'Delivery', 'partition': '201901', 'status': 'succeeded'}, 
   {'table': 'Delivery', 'partition': '201902', 'status': 'succeeded'},
   ...
   {'table': 'Delivery', 'partition': '201911', 'status': 'succeeded'}, 
   {'table': 'Delivery', 'partition': '201912', 'status': 'succeeded'},
   ...
   {'table': 'OrderType', 'partition': 'Partition', 'status': 'succeeded'}
 ]}

但是这个模型相当大,我只想刷新交付表的最后 2 个月。

按照文档,我在 POST 请求中发送此内容:

{'Type': 'full', 
 'CommitMode': 'transactional'
 'Objects': [
   {'table': 'Delivery', 'partition': '201912'}, 
   {'table': 'Delivery', 'partition': '201911'}
 ]}

但现在我立即得到这样的回应:

{'startTime': '2019-12-10T08:09:17.6665594Z', 
 'endTime': '2019-12-10T08:09:18.5620142Z', 
 'type': 'full', 
 'status': 'failed', 
 'currentRefreshType': 'full', 
 'objects': [
   {'status': 'failed'}, 
   {'status': 'failed'}, 
   {'status': 'failed'}, 
   {'status': 'failed'}], 
 'messages': [
   {'message': "The specified table '(null)' not found in the target model.", 'type': 'error'}
]}

我已经尝试过使用不同的表(指定或不指定分区)、不同的分区等,但总是收到相同的错误消息。

我不明白在进行完全刷新时会找到这些表,但在特定表上进行刷新时却找不到这些表?

最佳答案

我也遇到了同样的问题。您应该执行两个 POST 请求,如下所示:

{'Type': 'full', 
 'CommitMode': 'transactional'
 'Objects': [
   {'table': 'Delivery', 'partition': '201912'}
 ]}

{'Type': 'full', 
 'CommitMode': 'transactional'
 'Objects': [
   {'table': 'Delivery', 'partition': '201911'}
 ]}

我知道这不是最好的解决方案,但值得一试。

关于仅刷新某些表/分区时,通过 REST API 调用的 Azure 分析服务异步刷新不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59263652/

相关文章:

azure - 如何使用 REST API 获取 Azure 资源组中没有标签的所有 Azure 资源

azure - 如何从 ASP.NET Core 应用程序查询 Azure 分析服务中的数据?

azure - 如何将默认的 Azure 工作簿组状态设置为展开?

azure - Microsoft BI 架构 : Power BI, 分页报表、分析服务和云 - 最佳解决方案是什么?

azure - 需要帮助将项目插入 Cosmos Collection

c# - 何时使用 async 和 wait - 客户端 vs webapi

azure - 通过 ARM 部署时无法在 QnA Maker 中创建 KB(未找到端点 key )

python - mysql.connector.errors.DatabaseError : 2005 (HY000): Unknown MySQL server host 'db' (2)

azure - 我可以在 Mac 上使用哪个工具来创建 Analysis Services 表格模型?

powershell - 调用-ASCmd : Authentication failed: User ID and Password are required when user interface is not available