Source Control with Power BI - Can it be done?

In Business Intelligence & Analytics


Source Control with Power BI - Can it be done? - read the full article about business intelligence, Business Intelligence & Analytics and Data analytics and consulting from Guy in a Cube on Qualified.One
alt
Guy in a Cube
Youtube Blogger
alt

- Yooo! Adam Saxton with Guy in a Cube, and in this video, lets talk about source control or version control and what that means for Power BI "cause I know you wanna know.

Lets do this.

(upbeat music) If youre finding us for the first time, be sure to hit that subscribe button to stay up to date with all the videos from both Patrick and myself.

Alright, Source control, version control, Power BI.

What does this all mean? We get this question a lot.

So anytime were doing a live stream or were doing some sort of Q&A for some user group or conference or whatever, this question comes up at least one time.

Sometimes more than once.

Really what people are asking for is, they want a separation of the report, the data model and the power query elements.

And be able to save those from a versioning perspective to do rollbacks or divs between the files to see what changed.

And then be able to deploy those in a consistent manner, so continuous integration or continuous deployment also referred to as CI/CD.

So if you hear that term, thats what that means.

So this is just like a deployment operation for your source files.

That would be the magical state of Power BI but its not quite there yet.

And hopefully it will be someday.

So let me show you whats available today.

And then lets talk about some things that are coming down the pipeline that we can explore a little bit.

Right, enough of all this talking.

You know how we like to do it here in Guy in a Cube, is to what? Head over to my machine.

Ive got my lovely report right here.

What I wanna do is have some sort of version control or source control.

The thing to understand here is that the Power BI desktop file itself, the PBIX file, is just a binary file, right.

So we cant do divs on this file.

It includes everything.

It includes the reports.

It includes the model definition.

It includes all those power query elements.

And we cant separate that from a source control perspective.

So all we can do is stick this binary file into some sort of source control system.

What Ive seen a lot of people do, and this works well.

Theyll stick it into like a OneDrive folder or a SharePoint document library.

And so this is a OneDrive folder thats connected to the Cloud.

And when I do this, I can right click and I can say, hey, show me the version history.

And this will show the OneDrive version history as part of it, so you can see that Ive got multiple items here that are available and I can click on that.

I can say, hey, restore this version or download it independently.

And this tracks changes.

This is probably the easiest thing that a business user can do cause its readily available.

Most folks have either OneDrive or SharePoint from an office integration perspective.

If theyre using office 365, Im sure that theres some sort of functionality with Google Drive as well or Dropbox or things of that nature.

So you could explore those if thats what youre using but this is a great option for just anyone, right? So if we wanna take this up a level and what we can do there is GitHub or Azure DevOps or something of that nature where we can actually have items that are in here.

Let me go ahead and refresh this.

And we can see that in a different branch here, go to my version demo here.

And Ive got a models folder, right? And Ive got items that are here so I can have PBIX files that are stored inside of GitHub.

And then those can be tracked from a version history as well.

And you can go based on your commits and things of that nature, you can track the versions of those items.

But again, this is just the binary file, right? I cant do divs.

I cant extract different components of it or see what changed.

So youre just stuck to the binary file.

What we can do is, the model side of this.

So the model piece, we have some options here that take this a little further especially if youre using Power BI premium.

Let me show you what I mean.

So if Im inside of my report, Ive got a tool called Tabular Editor thats installed and so I can just go to external tools.

I can go to Tabular Editor.

And when Im inside of that, I could do file save as and I can save the BIM file.

So this is the BI model, right? This is the model definition of my report.

And when I look at that, right, I can just right click and open it with code or notepad here.

Let me just open it with our friendly tool notepad.

Its just a JSON file, right? So this is the model definition.

This is a text file.

I can work with text files.

I can do divs on text files.

I can do any extraction of that text file.

Text files work really good with source control.

And so from a model definition perspective if we can get that BIM file you can actually do tracking and changes on that.

There is some process you need to put around that in terms of check-ins and making sure people are actually following the steps to do it.

Theres no direct integration with Power BI desktop to do this.

So you have to go a little extra steps to go through that process.

And that can be a little bit of a struggle especially if youre working with a business team that doesnt understand how all of this works.

One advantage of this is, Im using GitHub in this case and I can go through and as I make changes on these items I can see that, hey, somethings been modified here.

When those modifications happen, you may be like, I wonder what changed.

So let me do this, open it up in Visual Studio Code.

When Ive got the file inside of Visual Studio Code.

If I go to my GitHub integration and I right click and then Im gonna say, what changed in this file? And so I can see these are the changes.

This is whats actually being committed to my GitHub repo at this point.

In the original file I can see that we had is hidden, true, but in the version that has the changes, I can see that, thats been removed.

Another one that was originally hidden but now its removed and we can go through and see, okay what were those changes? Do I wanna actually commit those? So again, doing that div operation to understand whats been changing.

And this is what I think everyone wants in terms of the report definition, the model the power query, all of those things.

Just being able to explore what actually changed.

So we can technically do it from a model perspective.

One word of caution on this, is when you start doing this you cant necessarily deploy these changes back into Power BI desktop.

So thats not technically supported.

What you can do is if youre using Power BI premium youve got the xmla endpoint.

You can start using tools like ALM toolkit and be able to deploy that to the xmla end point.

So if youre going through an actual development process of your data model, this can be effective and be done for the modeling piece specifically, thats the only part of Power BI that really you can do that with today.

Lets look at whats coming down the pipeline to do that.

We have to talk about deployment pipelines.

Theres already been announcements that Azure DevOps and GitHub integration is coming for deployment pipelines.

What that means is that youll be able to tie in your CI/CD or your continuous deployment operations, with Azure DevOps and GitHub and push those into the deployment pipelines from a Power BI perspective.

So if you have some sort of change operation, hey, theres files there I wanna update the file.

And then I wanna actually push that from dev to test to prod and or update the app.

Those are the things that are gonna be available in that update.

What this is not gonna give you is that separation of those items, give you that full div capabilities and things of that nature.

So, those are items that I know a lot of people have been asking for.

Im hoping that at some point in the future we will get that type of separation and level of detail that we can work with that but today its just not available.

And Ive also got a link to an idea item from ideas.powerbi.com in the description below too its got almost a thousand votes.

You can vote that up as well if thats something that youre interested in.

I think theres some other ideas that are out there as well that you can vote up as well, just to lend your voice to the product and just say, this is what we want.

Hopefully this helps you wrap your head around whats available from a version control or source control perspective.

Id love to know your thoughts.

Let me know in the comments below.

How have youve been working with this? Do you have like techniques that youre using to actually accomplish these operations in your environment? Id love to know.

If you liked this video be sure to hit that big thumbs up button, smash it if you so desire.

If its your first time here, hit that subscribe button.

And as always from both Patrick and myself thank you so much for watching, keep being awesome.

And well see you in the next video.

Guy in a Cube: Source Control with Power BI - Can it be done? - Business Intelligence & Analytics