Azure Data factory-Power BI dataset refresh

Overview:

The Power BI dataset must be refreshed according to the schedules defined so that the reports will have latest data.

We must manually configure the refresh intervals in Power BI scheduler. Once data is populated in Structured Zone from landing Zone in Azure environment, Power BI refresh must be scheduled. Thus, always manual intervention is required if they have different schedules and in case of long running jobs from landing zone to structured zone. To address such issues, we can configure Power BI dataset Refresh task in Data factory pipeline itself as a task after populating data into SZ.

We can avoid manual interventions and monitoring to see if data is refreshed to reports without any breaks.

Implementation:

This can be achieved by configuration of Power Bi dataset refresh via Logic Apps in the Azure portal.

Please follow below mentioned steps to configure and refresh Power Bi dataset.

  1. Go to the Azure portal
  2. Select ‘Logical Apps’ option from the Menu.
  3. Create a new logical app by selecting ‘Add’ button from the context Menu.

 

You will be redirected to the following Pane. Please enter the name and ‘Resource Group’ related to the Logic app and then click on ‘Create’ button so that new workflow is created.

It looks as shown below.

Click on the newly created Logic App –‘Test_Sample’ and configure the workflow accordingly.

 

Configure the next steps by selecting the ‘When a Http request is received’. An URL will be generated. Copy the URL for future use to configure at the data factory pipeline.

Click on the ‘Next step’ button to configure the further steps in the workflow.

In the search box, type Power BI and choose it.

You will be redirected to the page with below options, then please select ‘refresh a Dataset’(Preview).

You will be redirected to the sign in page of the Power BI. Please enter your credentials. Since your account is already configured with the datasets in Power BI workspace, you will be asked to choose

workspace’ and ‘Dataset’. Please configure them accordingly and then click on ‘Save’ button so that the workflow will be saved in the Logic App designer.

The logic app created will be in the below mentioned format.

Now Go to the data factory and configure the pipeline to call the Logic App, which internally calls Power BI dataset and refreshes it automatically.

In the azure portal, Open the Data factory and create a new pipeline by dragging and dropping the ‘Web task’ in the pipeline.

Click on the web task and then configure the settings as shown below. Paste the URL configured in the Logic App in the URL tab mentioned below.

Select ‘POST’ as the web method call.

In the datasets linked server will be configured to Power Bi portal.

When you click on the ‘Debug’ button on the top then data factory pipeline will be executed as shown below.

Go to the Power BI website, to see the dataset getting refreshed (latest timestamp will be updated).Please refer to screenshot below for details.

Thus, Power BI dataset can be refreshed independently through Data factory without manual interventions.

Conclusion:

Thus, Data factory pipelines are intelligent enough to support logic apps through which we can refresh Power BI Dataset.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *