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



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

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

您可以添加分区和表进行刷新,如下所示:

{
"CommitMode": "transactional",
"MaxParallelism": 2,
"Objects": [
{
"partition": "FACT_Sale_Daily FY12",
"table": "FACT_Sale_Daily"
},
{
"partition": "FACT_Sale_Daily FY13",
"table": "FACT_Sale_Daily"
},
{
"table": "DIM_Currency"
},
{
"table": "DIM_Date"
},
{
"table": "DIM_LoyaltyType"
},
{
"table": "DIM_Merch"
},
{
"table": "DIM_Store"
},
{
"table": "DIM_Store_Comp"
},
{
"table": "DIM_Store_Comp2"
},
{
"table": "ETL_Date"
}
],
"RetryCount": 2,
"Type": "Full"
}

最新更新