Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
iBusinessBI
Kudo Collector
Kudo Collector

Can a Pipeline refresh a Dataset (Semantic Model) as one of the steps?

I have a Pipeline that refreshes some Dataflows.

I want it also to refresh a Dataset (Semantic Model). How do I do it?

Currently I use Power Automate to refresh Data Set after a certain Dataflow is refreshed (I don't want to schedule by time, only after a Dataflow is refreshed).

But I prefer everything to be in one place - Pipeline.

How do I achive it?

1 ACCEPTED SOLUTION
v-gchenna-msft
Community Support
Community Support

Hi @iBusinessBI ,

Thanks for using Fabric Community.

As I understand you are trying to refresh Dataset (Semantic Model) from Pipeline.
We can actually do it in two ways via RestAPI (using Web Activity) or sempy library (using Notebook Activity).

Following Article will provide some insights for Dataset Refresh

1. using RestAPI - Datasets - Refresh Dataset - REST API (Power BI Power BI REST APIs) | Microsoft Learn
2. using sempy - Refreshing Individual Tables and Partitions With Semantic Link (fabric.guru)

Hope this is helpful. Please let me know incase of further queries.

View solution in original post

7 REPLIES 7
tackytechtom
Super User
Super User

Just wanna upadate this thread: There has been released a dedicated semantic model refresh activity in Fabric pipelines. It's still in Preview, but it looks promising 🙂

 

Semantic model refresh activity in Data Factory for Microsoft Fabric (Preview) - Microsoft Fabric | ...



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

NandanHegde
Super User
Super User

Hey,

yes, it is possible to trigger the Power BI data set trigger post dataflow refresh leveraging the web activity  and filter activity combination in iterations.

Below would be the flow :

 

1) web activity : trigger the dataflow refresh via REST API

https://learn.microsoft.com/en-us/rest/api/power-bi/dataflows/refresh-dataflow

 

2) web activity / notebook: to get the transaction details of the latest execution :

 

 

As of now we there is no support on only getting the latest Dataflow refresh, however you can get the latest only by using some python code or other language you prefer. 
 
Example  python code:
 

 

import requests url = 'https://api.powerbi.com/v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}/transactions'headers = {'...
 

  or leverage web activity to get all transaction and filter based on created time

and iterate for the status till the dataflow refresh is completed

 

3) once DF is success, trigger powerbi dataset refresh

 

 

Sample blog:

https://datasharkx.wordpress.com/2022/11/07/refresh-power-bi-dataflow-dataset-from-azure-data-factor...

 

note: some part in blog might differ as that is w.r.t PaaS ADF

v-gchenna-msft
Community Support
Community Support

Hi @iBusinessBI ,

Thanks for using Fabric Community.

As I understand you are trying to refresh Dataset (Semantic Model) from Pipeline.
We can actually do it in two ways via RestAPI (using Web Activity) or sempy library (using Notebook Activity).

Following Article will provide some insights for Dataset Refresh

1. using RestAPI - Datasets - Refresh Dataset - REST API (Power BI Power BI REST APIs) | Microsoft Learn
2. using sempy - Refreshing Individual Tables and Partitions With Semantic Link (fabric.guru)

Hope this is helpful. Please let me know incase of further queries.

Thanks, @v-gchenna-msft 

I see that I can do it using REST API.

The Fabric environment needs to be a more low code, non-developers friendly platform.

In Power Automate I can do this with 3 clicks: choose "Refresh a deatset" action, choose Workspace, and choose a dataset - all from  a Dropdown boxes. No need for API REST knowledge, no need for coding.

Fabric Pipeline should be just as simple.  

Hi @iBusinessBI ,

Glad to know that your query got resolved. Please continue using Fabric Community for your further queries.

Appreciate if you could share the feedback on our feedback channel. Which would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.

 

Hope this helps. Please let me know if you have any further queries.

 

Hi @iBusinessBI ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .
In case if you have any resolution please do share that same with the community as it can be helpful to others .
Otherwise, will respond back with the more details and we will try to help .

Hi @iBusinessBI ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .
In case if you have any resolution please do share that same with the community as it can be helpful to others .
Otherwise, will respond back with the more details and we will try to help .

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

March 2024 FBC Gallery Image

Fabric Monthly Update - March 2024

Check out the March 2024 Fabric update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors