英文:
how to get refresh history for all datasets on workspace in powerbi
问题
请帮忙
如何获取工作区中所有数据集的刷新历史记录,在Power BI 上 - 我尝试了下面的方法,但它只针对单个数据集进行了指定
GET https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/refreshes
还希望创建一个管道,将结果保存在数据湖中
我尝试了这个方法,但一次只指定了一个数据集
GET https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/refreshes
我期望能够获取所有数据集的刷新历史记录,并创建一个管道,将结果保存在数据湖中。
英文:
Please help
How can I get the refresh history for all datasets in workspace, on powerbi - I tried the below method but its only specifying for a single dataset
GET https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/refreshes
Will also want to create the pipeline that will save the results in datalake
I tried using this method but only specifying one dataset at a time
GET https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/refreshes
I am expecting to to get refresh history for all datasets, create a pipeline that will save the results in datalake
答案1
得分: 2
这里有几点要注意,如果你想轻松地获取过去7天的历史记录,建议使用Power BI管理API中的刷新调用:
如果你确实需要获取数据集刷新的完整历史记录,不幸的是,你需要使用groupID和datasetId来获取每个数据集的历史记录。
好消息是,你可以首先使用以下API文档(Power BI管理API,GetDatasetsAsAdmin)获取所有数据集:
注意:如果你在Power BI中没有管理员权限,你可以使用此API调用来获取特定工作区内的数据集:
获得结果后,你可以将其写入你的DataLake。
然后,你可以使用Synapse或ADF来遍历你的数据集列表,并使用此API调用返回每个数据集的刷新历史记录:
这是一个ADF管道的示例(如果我没有弄错的话,与Synapse非常相似):
获取Power BI数据集
遍历所有已加载的数据集
这应该能很好地工作,因为我已经这样做了几年,尽管我只是使用简单的管理API调用,在单个调用中获取了过去7天的刷新历史记录。
干杯!
英文:
A few things here, if you wanted to easily get the last 7 days of history on a go forward basis, I would use the Power BI Admin APi call at this link:
If you really need to get a full history of dataset refreshes, unfortunately you will need to use the groupID and datasetId to get the history for each dataset.
The good news here is you can first get all datasets using the below API Documentation (Power BI Admin API, GetDatasetsAsAdmin):
**Note: If you do not have admin capabilities in Power BI, you can use this APi call to get the Datasets within a particular workspace:
Get Power BI datasets without Admin Privileges
Once you have the results, you can write that to your DataLake.
You can then use Synapse or ADF to iterate over your dataset list and return dataset refresh history for each dataset using this API Call:
Here is an illustration of an ADF pipeline (very similar to synapse if I'm not mistaken):
Get Power BI datasets
Iterate on All Loaded datasets
This should work nicely as I have been doing this for a couple years now, though I just use the simple Admin API call to get the last 7 days of refresh history in a single call for all datasets.
Cheers!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论