- 2 days ago
Category
🤖
TechTranscript
00:00All right, now the second part of this CI-CD, but this time we're going to do it with Power BI.
00:10So in the last video, let's recap, we have actually connected our local folder to Azure DevOps and Azure DevOps to Fabric.
00:18And we were able to clone more or less the lake house, which we created in Fabric.
00:22So if I go to Fabric here, the lake house here itself back to Azure DevOps, which is here.
00:27You can see this and then also locally using VS Code, which is in here.
00:32So far, so good. But how can we do this now with Power BI reports?
00:35So this will be interesting because this will enable future Power BI developers to work together on the same Power BI report.
00:42So to set this up, what we need is, of course, Power BI Desktop installed.
00:46So we get started with Power BI Desktop and I already opened it here, a new report page.
00:50Second, we need a dataset. Now for the dataset, I decided to go with the famous Titanic dataset,
00:55which is available on GitHub because it's for free and everybody can use it.
00:59So if you want to choose this as well to try this out, you can follow along.
01:02So I also provide, of course, the link in the resource section.
01:06But for now, let's just have a look at GitHub.
01:08There it is. This is one example of the Titanic dataset up here.
01:11And what we can do now is we can simply take a look at the raw file.
01:15If you click on raw, you would get the raw CSV file, which looks like that.
01:19So that's fine because what we need is actually the URL for that.
01:23So let me just copy the URL to this specific file because this we can read into Power BI.
01:28So next, let's go back to Power BI Desktop in here and let's read the data first.
01:33So let's say get data. In this case, it is actually from the web.
01:38So let's go with web option here and then choose the specific URL path, which is this one.
01:43So I paste it inside and then I click on OK and we just wait.
01:48And then there we can see already a preview.
01:50So Power BI was able to recognize it is a CSV file and also that the delimiter by default is comma.
01:56Of course, you can change that if you want, but the default settings are quite fine
01:59because we can already see that in the preview. So far so good.
02:03Next, you could transform it if you want, but that's not required in this case.
02:07We just want to load and then we can load the data into Power BI.
02:11So just a second and then the data should be imported.
02:14There is up here. And of course, now we could create any kind of visualization.
02:18Interesting could be how many people have survived based on the gender.
02:22So we have here a gender column, which in this case is a sex column.
02:27We can click this option. This is male and female.
02:29And then we can take a look at how many have survived regarding the Titanic disaster.
02:33So there's a survive column, which is simply a Boolean one or zero, whether the person has survived or not.
02:38So let's check this option and then let's also make this maybe, let's say, some kind of visualization.
02:44Let's see, we have here a bunch, right? So we have this.
02:47And of course, we can format this further.
02:48So I can go to format option and maybe add at least data labels, right?
02:52And maybe the data labels just increase them in size so at least we can see them.
02:56So make them a little bit bigger like that maybe.
02:59Okay, so we got that. So far so good.
03:01Okay, now we have some kind of visualization.
03:03And of course, this report could be much more complex, but the idea is now we have a report.
03:07Okay, which we can start with.
03:09Okay, now next we need to save this report.
03:11And now it becomes interesting because we cannot save it as a normal PBIX file, which is a default file format for Power BI.
03:17We need the new file format, which is PBIP, which means Power BI project file.
03:22In order to use this file format, at the point of this recording, you need to enable this in the previous settings.
03:28So I go to the settings, clicking on the gear at the bottom right and click on it.
03:34And then just open this and go to the preview features in here.
03:38And then the preview features, there's an option, Power BI, PBI save option.
03:42So PBIP, to be specific, this is probably a project.
03:45And we need this option here.
03:47So you need to enable it and you might need to restart probably after doing this.
03:51So apologies for mentioning it so late, but this is what you have to do first.
03:55So having said that, this means that now we can save it under a new file format.
04:01And this file format allows us to do the version control with Power BI.
04:05So let's click on OK.
04:07I already enabled it and now I need to save my report locally in the new file format.
04:12So if I go with the save as option, I can save it in the same folder, which I do here.
04:18And I name this, for instance, in this case, Power BI underscore VC for version control.
04:24And then very important, don't save it under PBIX, but choose a new file format, which is PBIP.
04:30So click this option and then click on save.
04:33And this means that we now save our report.
04:36So far so good.
04:38OK.
04:39And let me just close this for now.
04:41And now it is saved.
04:43And this means we can now publish it to the Power BI service.
04:46But this time we don't do it using the publish option, which by default is the normal way to publish Power BI reports.
04:53But instead, what we do is we go back to, in this case, Visual Studio Code, which is this one here.
04:58And then we can actually check.
05:01You can see that now we have new files on here.
05:03There's also interesting just to mention this for the Power BI report developers, which watch this video.
05:08There's now a Power BI VC report and there's a Power BI VC semantic model created in here.
05:13Right.
05:14And you can also find those if you open the folder.
05:16You will see now you have a PBI VC report and as well as the semantic model, as well as the PBIP file.
05:21So there are several files created now, not only one file, as we are used to when you save it as PBIP files.
05:28So having said that, now we have this.
05:31And let's check that.
05:32Let's say git status.
05:34Git status returns or gives us the current status of our git structure.
05:37And we see that we have new files created in here.
05:40So what we do basically is we say git add and dot.
05:43This just means we add all the files to git.
05:45And then we can commit it the same way as before.
05:48Git commit.
05:49And then dash m Power BI created.
05:53And then I add this and then we can push it to Azure DevOps.
05:58Meaning in this case, we say git push.
06:02So we just upload it now to Azure DevOps.
06:05It might take a little time.
06:06And there we go.
06:07And now let's go back to the Azure DevOps repo, which is this one here.
06:11And we should see just in a second, if we click on repo one more time, that now we also have the Power BI report added here.
06:16And we can find these files.
06:18And this just means that now it is here in the branch.
06:21In this case, our main branch.
06:22And then if we go to fabric, we should see just in a second that the source control should give us some indication.
06:27That there are new files available in here.
06:30And that we should update it.
06:32And then the Power BI report should also be part of this specific workspace.
06:36Just in case that doesn't happen automatically.
06:38What you can also do is just refresh the browser.
06:40Sometimes you need to do this.
06:41Let me do it for one time.
06:43And then you should see actually the indication.
06:45And I can see there are two new items.
06:47Why two?
06:48Remember, we have two files now for the Power BI report for the Power BI project file.
06:52So that just means, yes, I go to source control.
06:55Click on it.
06:56And we can see these are the two new things.
06:58Which is the Power BI report itself.
06:59As well as here, the semantic model.
07:02So that just means we can click on update all.
07:05Click this option.
07:06And this just means now it gets synced from the Azure DevOps into this specific workspace.
07:11So now the item is synced.
07:12Both of them to be specific.
07:14And now if I click on the report the first time, you will see that the report is empty.
07:19So the question is now, why is the report empty?
07:21Well, the reason for this is after syncing this the first time, you need to refresh the
07:25data model.
07:26Meaning, I can go back to fabric workspace.
07:28And then I can go in here and just click on refresh in here.
07:32So click refresh now.
07:33And then we run it in error.
07:35The reason is because we did not update the credentials.
07:37So go to the three dots.
07:38And then go to settings.
07:40And you can see that now added web credentials.
07:43Click on this option.
07:44And the numbers is fine.
07:46Privacy level could set it to num.
07:48If you do it in an organization, you would probably use OAuth2 or service principle in
07:53this case.
07:54And also then organizational as the privacy level.
07:56But for now, this is an open source file.
07:58So click on sign in.
07:59Just to configure this.
08:01And now the web data source is updated.
08:03Let's go back inside the fabric workspace.
08:05Let's refresh this model one more time.
08:07Click on the refresh icon.
08:08Now there shouldn't be an error.
08:10And as soon as the data is refreshed, we should also see the PowerWear report inside Microsoft
08:14Fabric.
08:15And we are good to go.
08:16That went fast because the data is small.
08:17And let's go back one more time to our PowerWear report.
08:20Let's click this option.
08:21And then let's refresh the report.
08:23Click on the refresh icon up here.
08:24And now we can see there is the data.
08:27So this just means that now we created locally a report.
08:30And then we synced it via devops.
08:32And then back into the Fabric workspace.
08:34And the interesting part now is, of course, that this can be done in both ways.
08:38What I mean by that is, let's say we would like to edit this report, but this time not locally,
08:43but instead here inside Power BI service or inside Fabric to be specific.
08:47So this means we can go to edit.
08:50So click on edit.
08:51And then just say, I like to change this and I like to maybe switch bars like that.
08:56Okay.
08:57For instance, you can do, of course, any other kinds of transformation.
08:59It's just a simple one for now.
09:00So that means that let me just close this in for now as well.
09:05Now let's save this report.
09:06Click on save.
09:07Okay.
09:08The report has been saved and updated.
09:10Now let's go back to our Fabric workspace.
09:12Take this option.
09:13And we should see just in a minute that now we have the source control is highlighting the,
09:18in this case, this specific workspace, the perfect workspace has items which are not committed,
09:24which are not synced to the Azure DevOps, as you can see here.
09:27And this means that I can go to source control and then I can also select the file.
09:32In this case, it's only the report because the data set itself hasn't changed, right?
09:36We have no new data set.
09:37Only the report has been changed.
09:39And now we can commit this clicking on commit option.
09:42So let's do that.
09:44Okay.
09:45So we have committed the change.
09:47And now if we go to the repo one more time, we should see that the data here has changed.
09:54So let me go click on repo one more time.
09:56And you see that here probably report file has been updated just now.
09:59Exactly.
10:00And so that's fine.
10:02And now next, we need to go back to our local Power BI file.
10:06So let me go back to the file.
10:07This is still currently open.
10:09So nothing has changed so far.
10:11This is correct.
10:12But let me just close this file for now.
10:14Let's close it.
10:15So don't save for now.
10:18And now let's go back to our Visual Studio code.
10:23So let me open it one more time in here.
10:26And now let's actually pull the newest data.
10:29So simply run git pull for now.
10:32So now we pull the new Power BI report file.
10:35You can see that there are changes which are happening here.
10:38And now if I go back to the folder.
10:41So like this one.
10:42And if I now open the report one more time.
10:44Let's double click on the PBI file.
10:46And let's just check out what has changed.
10:48So whether the DevOps change.
10:50So the error DevOps change has also been applied here inside this specific report.
10:56And here it is.
10:57And you can see that now we also have the same change.
11:00So the bars are not horizontally anymore but now vertically.
11:04And this of course can be also adjusted to a more comprehensive and more advanced report as well.
11:09It works exactly the same way.
11:11So that just means we have now the option to locally make changes.
11:14And then sync this to the Azure DevOps.
11:16And from Azure DevOps to Fabric workspace.
11:18And the same is true the other way around.
11:20So from the Fabric workspace we can change the report.
11:23And then we can sync this to Azure DevOps.
11:25And then back to our local folder.
11:27And this now gives also several Power BI developers the option to work together.
11:32Because they can work on the same report.
11:34They can then sync their changes to the Azure DevOps.
11:37Where everything then gets together in the main branch at the end.
11:41Of course during the development everyone would have his own or her own branch.
11:45But this would be merged into the main branch.
11:47And the main branch can be synced to Azure.
11:49In this case via Azure DevOps to the Fabric workspace.
11:52So this is an introduction to version control with Power BI.
11:56It's quite interesting.
11:57And hopefully you enjoyed it.
11:58Please give it a try yourself.
12:00If you got questions let me know.
12:02Otherwise thanks a lot for watching.
12:03And hopefully see you in the next video.
12:05Until then.
12:06Peace guys.
Recommended
13:20
|
Up next
13:32
12:23
5:10
0:36
0:33
24:07
1:16:45
0:46
Be the first to comment