Datasets - Get Refresh Execution Details In Group

从指定工作区返回指定数据集的 增强刷新操作 的执行详细信息。

权限

此 API 调用可由服务主体配置文件调用。 有关详细信息,请参阅:Power BI Embedded 中的服务主体配置文件

所需范围

Dataset.ReadWrite.All 或 Dataset.Read.All

GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes/{refreshId}

URI 参数

名称 必需 类型 说明
datasetId
path True

string

uuid

数据集 ID

groupId
path True

string

uuid

工作区 ID

refreshId
path True

string

uuid

刷新 ID

响应

名称 类型 说明
200 OK

DatasetRefreshDetail

正常 (刷新操作完成或失败时返回此响应)

202 Accepted

DatasetRefreshDetail

接受 (刷新操作仍在进行时返回此响应)

示例

Completed refresh example
Failed refresh example
In progress refresh example

Completed refresh example

Sample Request

GET https://api.powerbi.com/v1.0/myorg/groups/fdb91b8f-0a9b-44c1-b6c0-0cb185c6ebfb/datasets/f7fc6510-e151-42a3-850b-d0805a391db0/refreshes/87f31ef7-1e3a-4006-9b0b-191693e79e9e

Sample Response

{
  "startTime": "2021-12-10T08:40:31.57",
  "endTime": "2021-12-10T08:40:43.87",
  "type": "Full",
  "commitMode": "Transactional",
  "status": "Completed",
  "extendedStatus": "Completed",
  "currentRefreshType": "Full",
  "numberOfAttempts": 0,
  "objects": [
    {
      "table": "DateTableTemplate_78e78207-b3fb-41b5-8b95-e5efca989067",
      "partition": "DateTableTemplate_78e78207-b3fb-41b5-8b95-e5efca989067-ae306fb4-3b7e-4a41-824d-cb3b452fedfc",
      "status": "Completed"
    },
    {
      "table": "LocalDateTable_e9d8a66b-4018-4d16-be8c-402b2037c051",
      "partition": "LocalDateTable_e9d8a66b-4018-4d16-be8c-402b2037c051-59bc07f8-85c9-456a-ad36-18e1de4d77ed",
      "status": "Completed"
    },
    {
      "table": "LocalDateTable_55935f6b-04d1-4cfe-8856-ed9f9e73ab2e",
      "partition": "LocalDateTable_55935f6b-04d1-4cfe-8856-ed9f9e73ab2e-d95ae7f7-19c9-48a8-9c16-fcab26558bc2",
      "status": "Completed"
    },
    {
      "table": "LocalDateTable_ff25f80e-eb04-4229-986d-b40223c04f1c",
      "partition": "LocalDateTable_ff25f80e-eb04-4229-986d-b40223c04f1c-6606fc4c-4cda-49e1-8acd-e55a6ec36cb3",
      "status": "Completed"
    },
    {
      "table": "DimCurrency",
      "partition": "DimCurrency-e5524cc4-a898-433b-91aa-c001b9a6d676",
      "status": "Completed"
    },
    {
      "table": "DimCustomer",
      "partition": "DimCustomer-a31bbd93-e20a-4dee-a33c-7afa27785953",
      "status": "Completed"
    },
    {
      "table": "LocalDateTable_fa65a206-f320-4d5d-abcc-1dc0f051ca7d",
      "partition": "LocalDateTable_fa65a206-f320-4d5d-abcc-1dc0f051ca7d-06a48a0a-a32b-48a3-b113-924aafd6363c",
      "status": "Completed"
    },
    {
      "table": "LocalDateTable_78a4e1b7-a2e5-4bbf-ab68-7c87961b68a2",
      "partition": "LocalDateTable_78a4e1b7-a2e5-4bbf-ab68-7c87961b68a2-5b3ba715-7c84-4e52-b310-485b93cfbe6d",
      "status": "Completed"
    },
    {
      "table": "DimDate",
      "partition": "DimDate-62e2f91b-53e5-4ed3-8618-fec74dba5e0d",
      "status": "Completed"
    },
    {
      "table": "LocalDateTable_e72c294f-0a06-4051-b943-e6bf8389e2c3",
      "partition": "LocalDateTable_e72c294f-0a06-4051-b943-e6bf8389e2c3-891a0e68-d414-4ba3-9c4b-e6f1ec73d4f3",
      "status": "Completed"
    },
    {
      "table": "DimProduct",
      "partition": "DimProduct-3d07cc89-2bd7-4a98-bb37-3368c1562f98",
      "status": "Completed"
    },
    {
      "table": "LocalDateTable_e37e4431-8c1a-449c-8796-b704df200a92",
      "partition": "LocalDateTable_e37e4431-8c1a-449c-8796-b704df200a92-8596ebb8-418f-4e50-a921-dac88c6f1339",
      "status": "Completed"
    },
    {
      "table": "LocalDateTable_73faffeb-a0c7-4ea1-83dc-530823b0fea0",
      "partition": "LocalDateTable_73faffeb-a0c7-4ea1-83dc-530823b0fea0-13795c4e-708f-4ddc-8ea3-5a2f39ae2253",
      "status": "Completed"
    },
    {
      "table": "DimPromotion",
      "partition": "DimPromotion-21e6c333-430e-4350-8c94-cdceb362c4c7",
      "status": "Completed"
    },
    {
      "table": "LocalDateTable_9c19746b-db7d-4b7e-b95d-c66e4b8fefc8",
      "partition": "LocalDateTable_9c19746b-db7d-4b7e-b95d-c66e4b8fefc8-395de144-ad53-41c0-9ec0-68bab6158d99",
      "status": "Completed"
    },
    {
      "table": "LocalDateTable_d96435dd-6110-4246-996c-616c96125e71",
      "partition": "LocalDateTable_d96435dd-6110-4246-996c-616c96125e71-891737ee-c46c-4b9f-bfa8-e4555004e20f",
      "status": "Completed"
    },
    {
      "table": "DimSalesTerritory",
      "partition": "DimSalesTerritory-6d88f938-13d5-49f8-899c-d11b3d346ad5",
      "status": "Completed"
    },
    {
      "table": "FactInternetSales",
      "status": "Completed"
    }
  ],
  "refreshAttempts": [
    {
      "attemptId": 1,
      "startTime": "2021-12-10T08:40:31.57",
      "endTime": "2021-12-10T08:40:43.87",
      "type": "Data"
    }
  ]
}

Failed refresh example

Sample Request

GET https://api.powerbi.com/v1.0/myorg/groups/fdb91b8f-0a9b-44c1-b6c0-0cb185c6ebfb/datasets/f7fc6510-e151-42a3-850b-d0805a391db0/refreshes/351f7113-59bb-4e5e-8c1e-e15ae7414121

Sample Response

{
  "startTime": "2021-12-10T08:39:28.517",
  "endTime": "2021-12-10T08:39:30.04",
  "type": "Full",
  "commitMode": "PartialBatch",
  "status": "Failed",
  "extendedStatus": "Failed",
  "currentRefreshType": "Full",
  "numberOfAttempts": 0,
  "messages": [
    {
      "message": "RefreshApiRequest for table refresh using refresh policy must have the property 'CommitMode' = 'Transactional' instead of 'PartialBatch'.",
      "type": "Error"
    }
  ],
  "refreshAttempts": [
    {
      "attemptId": 1,
      "startTime": "2021-12-10T08:39:28.517",
      "endTime": "2021-12-10T08:39:30.04",
      "serviceExceptionJson": "{\"errorCode\":\"ModelRefresh_ShortMessage_ProcessingError\",\"errorDescription\":\"0xC112001C: Expression.Error: Forced Error. . The exception was raised by the IDbCommand interface.\\n0xC112001C: The command has been canceled.. The exception was raised by the IDbCommand interface.\\n0xC11C0006: The current operation was cancelled because another operation in the transaction failed.\\n0xC112001C: The command has been canceled.. The exception was raised by the IDbCommand interface.\\n0xC112001C: The command has been canceled.. The exception was raised by the IDbCommand interface.\\n0xC112001C: The command has been canceled.. The exception was raised by the IDbCommand interface.\"}",
      "type": "Data"
    }
  ]
}

In progress refresh example

Sample Request

GET https://api.powerbi.com/v1.0/myorg/groups/fdb91b8f-0a9b-44c1-b6c0-0cb185c6ebfb/datasets/f7fc6510-e151-42a3-850b-d0805a391db0/refreshes/630110f5-8f93-49c2-afee-bfc87072460c

Sample Response

{
  "startTime": "2021-12-14T03:46:04.833",
  "type": "Full",
  "commitMode": "Transactional",
  "status": "Unknown",
  "extendedStatus": "NotStarted",
  "currentRefreshType": "Full",
  "numberOfAttempts": 0
}

定义

名称 说明
DatasetRefreshDetail

Power BI 刷新详细信息条目

DatasetRefreshDetailCommitMode

确定对象是成批提交还是仅在完成时提交

DatasetRefreshDetailExtendedStatus

数据集操作详细状态

DatasetRefreshDetailStatus

数据集操作常规状态

DatasetRefreshDetailType

要执行的处理类型

DatasetRefreshObjects

Power BI 数据集刷新目标

EngineMessage

来自引擎的错误或警告消息,用于增强刷新

RefreshAttempt

如果遇到刷新失败,Power BI 会自动多次尝试刷新数据集。 此对象包含有关每次刷新尝试的信息。

RefreshAttemptType

刷新尝试的类型。

RefreshEngineErrorType

错误类型

DatasetRefreshDetail

Power BI 刷新详细信息条目

名称 类型 说明
commitMode

DatasetRefreshDetailCommitMode

确定对象是成批提交还是仅在完成时提交

currentRefreshType

DatasetRefreshDetailType

当前迭代的处理类型。 当 设置为 时 commitMode ,这非常有用 PartialBatch

endTime

string

如果正在进行刷新,刷新 (的结束日期和时间可能为空)

extendedStatus

DatasetRefreshDetailExtendedStatus

数据集操作详细状态

messages

EngineMessage[]

刷新请求的引擎错误或警告消息数组

numberOfAttempts

integer

刷新请求的尝试次数

objects

DatasetRefreshObjects[]

刷新请求中包含的对象的数组

refreshAttempts

RefreshAttempt[]

刷新尝试列表。

startTime

string

刷新的开始日期和时间

status

DatasetRefreshDetailStatus

数据集操作常规状态

type

DatasetRefreshDetailType

要执行的处理类型

DatasetRefreshDetailCommitMode

确定对象是成批提交还是仅在完成时提交

名称 类型 说明
PartialBatch

string

批量提交刷新操作

Transactional

string

将整个刷新操作作为事务提交

DatasetRefreshDetailExtendedStatus

数据集操作详细状态

名称 类型 说明
Cancelled

string

客户已取消刷新操作

Completed

string

刷新操作已成功完成

Disabled

string

选择性刷新禁用刷新操作

Failed

string

刷新操作失败

InProgress

string

正在执行刷新操作

NotStarted

string

刷新操作未启动

TimedOut

string

刷新操作超时

Unknown

string

完成状态未知

DatasetRefreshDetailStatus

数据集操作常规状态

名称 类型 说明
Completed

string

刷新操作已成功完成

Disabled

string

选择性刷新禁用刷新操作

Failed

string

刷新操作失败

Unknown

string

完成状态未知或正在进行刷新

DatasetRefreshDetailType

要执行的处理类型

名称 类型 说明
Automatic

string

如果对象需要刷新并重新计算,则刷新并重新计算对象及其所有依赖项。 如果分区处于“就绪”以外的状态,则应用。

Calculate

string

仅当需要时,重新计算此对象及其所有依赖项。 此值不会强制重新计算,可变公式除外。

ClearValues

string

清除此对象及其所有依赖项中的值

DataOnly

string

刷新此对象中的数据并清除所有依赖项

Defragment

string

在指定的表中对数据进行碎片整理。 在表中添加或删除数据时,每一列的字典都会受到污染,会出现实际列值中不再存在的值。 碎片整理选项将清除不再使用的字典中的值。

Full

string

对于指定分区、表或数据库中的所有分区,刷新数据并重新计算所有依赖项。 对于计算分区,重新计算此分区及其所有依赖项。

DatasetRefreshObjects

Power BI 数据集刷新目标

名称 类型 说明
partition

string

要刷新的分区

table

string

要刷新的表

EngineMessage

来自引擎的错误或警告消息,用于增强刷新

名称 类型 说明
code

string

十六进制格式的错误代码

message

string

错误或警告消息的文本

type

RefreshEngineErrorType

错误类型

RefreshAttempt

如果遇到刷新失败,Power BI 会自动多次尝试刷新数据集。 此对象包含有关每次刷新尝试的信息。

名称 类型 说明
attemptId

integer

刷新尝试的索引。

endTime

string

刷新尝试的结束日期和时间。 如果刷新尝试正在进行,则值为 void。

serviceExceptionJson

string

JSON 格式的失败错误代码。 如果没有错误,则为 Void。

startTime

string

刷新尝试的开始日期和时间。

type

RefreshAttemptType

刷新尝试的类型。

RefreshAttemptType

刷新尝试的类型。

名称 类型 说明
Data

string

刷新尝试将数据加载到数据集中。

Query

string

尝试刷新高级查询缓存和仪表板 tiles.u

RefreshEngineErrorType

错误类型

名称 类型 说明
Error

string

错误消息

Warning

string

警告消息