<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Part on Medium]]></title>
        <description><![CDATA[Stories by Part on Medium]]></description>
        <link>https://medium.com/@mydatajourney?source=rss-100d893228c8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Part on Medium</title>
            <link>https://medium.com/@mydatajourney?source=rss-100d893228c8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 11:02:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mydatajourney/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[PowerBI REST APIs to automate the Dataflows refresh from Azure Synapse]]></title>
            <link>https://medium.com/@mydatajourney/powerbi-rest-apis-to-automate-the-dataflows-refresh-from-azure-synapse-e2b0ee24d938?source=rss-100d893228c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2b0ee24d938</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[azure-synapse-analytics]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[power-bi-apis]]></category>
            <category><![CDATA[power-bi]]></category>
            <dc:creator><![CDATA[Part]]></dc:creator>
            <pubDate>Thu, 25 Jan 2024 02:33:38 GMT</pubDate>
            <atom:updated>2024-01-25T02:33:38.167Z</atom:updated>
            <content:encoded><![CDATA[<p>First Post!</p><p><strong>Scenario</strong></p><p>I have a PowerBI semantic model that retrieves data from two distinct PowerBI Data Flows. My objective is to establish a refresh schedule ensuring that DataFlow1 and DataFlow2 are refreshed prior to the Semantic model. I aim to trigger this refresh twice daily, and there are three viable methods to achieve this:</p><ol><li>Manually initiate the refresh for DataFlow1, followed by DataFlow2, and finally the Semantic Model. While straightforward, this method relies on someone to initiate the refresh process.</li><li>Implement a scheduled refresh for DataFlow1, DataFlow2, and the Semantic Model. This approach is less complex and ensures a systematic refresh based on the defined schedule.</li><li>Utilize PowerBI REST APIs to automate the refresh of both DataFlows and the Semantic Model. This method provides a programmatic way to manage the refresh process, offering automation and flexibility.</li></ol><p>Now, let’s explore how we can use PowerBI REST APIs along with Synapse pipeline. This approach not only provides a sequential refresh but also allows for additional activities like sending notifications.</p><p><strong>Solution</strong></p><p>Power BI REST APIs offer various endpoints to manage, administrate, and govern Power BI-related resources. For our purpose, we’ll be using two endpoints: one for refreshing the dataflow and another for checking the refresh status. You can find the documentation <a href="https://learn.microsoft.com/en-us/rest/api/power-bi/">here</a>.</p><p>To create a pipeline in Synapse Studio:</p><ol><li>Select “Integrate” and click on the plus sign, then choose “Pipeline.”</li><li>To kick-off the refresh we need to make a POST request to the HTTP endpoint https://api.powerbi.com/v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}/refreshes. <br>The GroupId and DataflowId can be obtained from the PowerBI service by selecting the dataflow. GroupId is the workspace ID.<br>Since we need to make a POST call, we’ll use a web activity in Synapse.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*9mxsx7tbH5jP4mIh-xW12w.png" /></figure><p>3. Next, find the refresh status by making a GET request to the HTTP endpoint https://api.powerbi.com/v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}/transactions. Similarly, use a web activity for this step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*fQ99vFGChXsYoLTOJdhUaw.png" /></figure><p>4. Since the refresh time varies, we’ll use a “Until” loop to keep calling the API until we get a status of “Success” or “Failed.” Move the “Refresh status” web activity inside the “Until” activity and set a condition to exit the loop when the status is achieved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*sGrd2jsAmSaAiSoAsu0f2A.png" /></figure><p>We can extend this pipeline to send notfications incase of failure. We will see that in a different post.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2b0ee24d938" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>