us-analytics.png
Contact Us

OBIEE Development: Comparing RPD files with Git (Free Open-Source Tool)

In October of last year, we revealed the best method for developers to maintain a binary RPD file in Git. Not only did we perform a walkthrough to implement this method, but we also provided it as open source. The historically difficult issue of maintaining a binary RPD file in Git was solved… well, mostly.

See the Code on Github


While our tool empowers developers to work quickly, reliably, and confidently, it certainly had some shortcomings. Chief among them being support for the Git “diff” operation. Previously, the tool could assist Git with merging RPD files, but had no way to compare RPD files using the Git “diff” operation.

And really, no version control solution is complete without being able to compare changes between files. That’s why we’ve upgraded our tool to include this functionality.

What the “diff” gets you

To demonstrate the importance of this functionality, let’s take a look at the previous workflow.

For an example, let’s consider the scenario when a developer has completed a set of tasks, and wants their work merged into the main repository. We can look at commit messages for details on what has changed, but that’s a pretty lazy way to do a code review.

obiee comparing rpd files with git_1

Some commit messages can even be entirely worthless. Thanks for nothing!

Okay, so let’s do the right thing and compare the RPD files so we can view the exact changes. Obviously, we need two RPD files to compare them, but there’s a problem — you don’t have a folder with all of your RPD files. Git handles all of the swapping of the RPD files behind the scenes, so you don’t really have access to all of them like you would in a MUD environment or in a different workflow.

obiee comparing rpd files with git_2

What do we compare our RPD against?

There are a few workarounds to this problem, but really, any workaround suggestion is just plain ridiculous. Git should be making our lives easier, and any workaround process will only serve to facilitate hair loss (trust me). This process should be possible by only executing a single command.

Now, with our upgraded tool, we can literally do this with a single command:
obiee comparing rpd files with git_3

And the output is exactly what you would expect from Git:
obiee comparing rpd files with git_4

Perfect, that’s exactly what we’re looking for. Don’t be mistaken, these aren’t some command-line hijinks. Here’s the output inside SourceTree:
obiee comparing rpd files with git_5

The output is actually the same output you would receive from using the “Compare RPD” functionality in the Admin Tool.

And just like that, you can use Git to manage your binary RPD file with no compromises.

Installation

We’ve previously covered how to set up the environment and configure the tool, so we’ll try to keep this brief. If you haven’t installed the previous version of the tool, we suggest you take a quick glance at our previous post. You’re also more than welcome to read the [README] file in the code repository, which covers the same steps.

First, let’s verify Python and Git are installed. This is easier than it sounds, we just need to run the following commands in a CMD/Powershell terminal:
obiee comparing rpd files with git_6

Make sure Python is at least version 3, and Git is at least version 2. If either command throws an error, please make sure Python and Git are both installed and included in your PATH environment variable.

Next, we need to update the .gitattributes file. If this is your first time installing the tool, just copy the .gitattributes file from our code repository into your Git repository. If you’ve already been using our tool, you only need to add the following line to your .gitattributes file.
obiee comparing rpd files with git_7

Be careful, if you’re adding/changing this file, it’s only saved in your current branch. That means if you want these changes to take effect in all development branches, you must make this change in all existing branches. It’s worth making this change in the master and develop branches so future branches will function properly without requiring further changes.

Now we need to update the .gitconfig file. Find the .gitconfig file (make sure you find the right one), and append the contents from the .gitconfig example file in our code repository.

obiee comparing rpd files with git_8

With these files, we’re just connecting the wires between Git and our custom tool.

Finally, we need to update the Python script. This is pretty straightforward, but with one caveat; make sure you copy the configuration variables from your existing script. If this is your first time installing, that’s nothing you need to worry about.

Copy the Python script over to your desired location and update the variables on lines 43, 44, and 45. If you have previous configurations, you may notice they’ve changed a little. It’s okay, we’ve just simplified the process. Only worry about the configuration variables in the new script.

As you update the tool, you may notice we’ve made some other improvements to the script as well. Let’s cover some those other new additions.

More Changes

Though the diff operation is wonderful, we’ve packed in some other great stuff too.

  • We’ve removed the repository path from the configuration. Developers can now use this tool across multiple repositories on a single development environment – you’re not restricted to only working in a single Git repository.
  • We’ve added logging to help debug a few things. We know the process can get complex, so we’ve tried to make it easier to track what’s going on. Logging is enabled by default, but it can be disabled if desired.
  • We’ve moved all temporary files to a hidden directory elsewhere. This should ensure your repository is kept pristine, while we do all the heavy lifting elsewhere.

Looking for other features, improvements or changes? Let us know in the comments – we would love to hear how we can make this tool perfect for you.

Conclusion

Our tool is the premier option for concurrent development with the RPD. It allows developers to use Git, the industry standard for source control, with a binary RPD file without making any sacrifices in quality, speed, or flexibility. No other approach empowers developers quite like this one.

Before we let you go, let’s briefly cover the benefits and drawbacks of our tool.

Advantages:

  • Full Git support: We can now use Git to manage the RPD in virtually all development workflows. Full version control, concurrent development, historical comparisons, automated merging, it’s all here. To see what makes Git so great, give this a quick read.
  • Unparalleled flexibility: Our tool has no requirements beyond the initial script dependencies. Whether your team uses Sourcetree or GitCMD, Gitflow or Github Flow, our tool works just fine. You don’t have to obey our process; our tool obeys yours.
  • Leverages Administration Tool: We use the best RPD merge and compare processes available, those provided through the Administration Tool. You can have the utmost confidence in the accuracy and validity of your RPD.
  • Standard Conflict Resolution Workflow: Merge conflicts are still handled through the Administration Tool, which your developers are already using in their workflow. Like above, you can have full confidence in the output of your developers.

Disadvantages:

  • The initial setup of the tool can be a tad inconvenient. That being said, we’ve done our best to make the setup as simple and straightforward as possible.
  • Our tool leverages the Administration Tool, so the minimum requirements for the Administration Tool are shared by our tool. This essentially makes the script Windows only, so some CI and CD environments may have trouble incorporating the tool.
  • Similar to the point above, the merge process for binary RPD files can only be as fast as the Administration Tool itself. With a large RPD file, this may be very slow. However, it's a price we pay gladly if it means guaranteed code quality.

The most flexible and reliable method of concurrent development with the RPD just got better. And the best part is it’s still free and open source.

Contact us to see how Git can help empower your developers and your business.

oracle-analytics-cloud-consultation

New call-to-action

Ask an EPM/BI Advisor

If you're here, you've got questions — and we've got answers. Book your consultation to ask us about any range of topics, including:

  • Evaluating EPM or BI technologies
  • Comparing on-prem vs. cloud
  • Planning upgrades and migrations
  • Estimating project costs and timeframes
  • And much more — ask us anything!

Let our experts tackle your toughest questions for you.

Let's Talk