Skip to main content

Power BI

New

Dataflow REST API - Get Refresh History

Vote (79) Share
Pavel Janata's profile image

Pavel Janata on 26 Jul 2019 13:40:18

Please add this operation. It is extremely useful in case of Datasets to monitor refreshes and even more important for me to check whether the refresh is stil going on or is already finished (and with what status). Based on this information I can either rerun the refresh or initialize following data transformation.

Comments (8)
Pavel Janata's profile image Profile Picture

bf8a68bf fdc2-ea11-a812-000d3a579c39 on 01 Sep 2020 14:57:07

RE: Dataflow REST API - Get Refresh History

+1 BRUNO Maria - to use Dataflows in an Enterprise situation (we are; paid for Premium, etc.) this is an absolute necessity to wrap together all components of a data solution.

Pavel Janata's profile image Profile Picture

5ef83092 ffcb-ea11-a812-000d3a9b112e on 22 Jul 2020 13:30:49

RE: Dataflow REST API - Get Refresh History

As the dataflow solution fits exactly with our technical constraints (a good balance between refresh duration and user experience in Power BI.com) we will extend the usage of it for heavy datasets.

But we cannot finalize the industrialisation of a sequence of 3 dataflows and the final dataset. To do so, it is absolutly necessary to be able to capture the refresh history of the dataflows in the REST API.

I think it would be logical to have in the REST API the same functionalities for dataflows than for dataset.

Pavel Janata's profile image Profile Picture

6a5dba18 8566-4d43-8882-8c2e4bdef03e on 10 Jul 2020 17:20:41

RE: Dataflow REST API - Get Refresh History

I wrote about a workaround here: https://endjin.com/blog/2020/04/power-bi-dataflow-refresh-polling

Pavel Janata's profile image Profile Picture

2d319429 2078-43df-a2a9-a196f49866e5 on 06 Jul 2020 00:14:30

RE: Dataflow REST API - Get Refresh History

Is there any workaround for this?
i don't see this feature in next release wave so not sure if this will be available anytime soon

Pavel Janata's profile image Profile Picture

4a3a1a14 5beb-4fb0-ba2e-510608515b21 on 06 Jul 2020 00:11:25

RE: Dataflow REST API - Get Refresh History

Just for inspiration, this is a workaround algoritm for this REST API operation. I'm running this in Logic Apps.

1) Save current time in UTC (var currentTime).
2) Refresh dataflow (REST API - Dataflows - Refresh Dataflow)
3) If request is succesfull (statusCode = 200) or dataflow is already refreshing (error.code = 'CdsaModelIsAlreadyRefreshing') continue, otherwise there is some error
4) Check dataflow every 3 minutes for 15 minutes (5 times in total) (REST API - Dataflows - Get Dataflow)
5) If last entity partition refresh time is greater than variable currentTime (last(last(entities).partitions).refreshTime > currentTime) then the dataflow is refreshed successfully
6) If not (after 5 checks) continue from step 2 (Refresh dataflow) - I'm running this loop 4 times...waiting for dataflow to be refreshed succesfully 60 minutes (4x15) total.

It is definetely not the robust solution but it is working for me without any problems.

If you need any detailed info let me know, I can provide more details.

Pavel Janata's profile image Profile Picture

781d1c8f 2ed4-467d-ada5-5a91c2ffc631 on 06 Jul 2020 00:11:16

RE: Dataflow REST API - Get Refresh History

Please make this happen. It would really be useful to schedule Dataflow Power Flows based on the completion of the previous step and Datasets Power Flows based on the completion of Dataflow.

Pavel Janata's profile image Profile Picture

e76f8814 61d0-416b-9563-d55ce424610e on 06 Jul 2020 00:06:08

RE: Dataflow REST API - Get Refresh History

Surprised this doesn't exist as part of the current API, as the dataset refresh has this currently. Require this to check to make sure a Dataflow refresh is finished prior to dataset refreshes

Pavel Janata's profile image Profile Picture

88c8e9e5 a1ee-4bce-9b31-ba9327cc080a on 06 Jul 2020 00:03:38

RE: Dataflow REST API - Get Refresh History

We absolutely need this