我正在尝试通过此处记录的 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/