Skip to main content

Semantic Modeler Series: Setting up Git repository

Using Git with Semantic Modeler

I will assume that I have already created a semantic model which has been deployed in my OAC environment. My intention is to share this semantic model with other developers who are working on this same model in the same time.

In OBIEE this was only possible by setting up Multi-User Development Environment (MUDE). My experience with MUDE is that it wasn't perfect, often, if not careful, it was leading to problems with locking, merging, deployments.

With Oracle Analytics and in particular with Semantic Modeler introduction, this has changed. When working with Semantic Modeler, Oracle Analytics gives developers two options how to setup (much stronger) collaborative environment by:

  • giving permissions to make updates to the model to other users - Semantic Modeler is, in a way, by default multi-user development environment, and
  • using Git, which provides proper multi-user development environment. In this case, access rights are given through Git directly.

Starting with existing Semantic Model

Integrating Semantic Modeler with Git is relatively straight forward process that can be accomplished within a few steps. Each Semantic Modeler in the list of models has associated menu (accessible on the right hand side).

Inspect Semantic Model

Selecting Inspect menu option opens a window in which users decide and set their development environments - under Sharing tab on the left side menu:

Permissions Permissions

Git Git

As you can see, Git is by default preferred option. However in my case it hasn't been configured yet. To configure git integration, one must open Semantic Model and click Git icon (located in bottom-right corner).

Configure Git

Because this is my first attempt to configure Git, it has to be initialized first.

Start configuring Git

Initialize Git window opens. It is assumed that Git repository has already been created, so Git repository URL should be provided.

Initialize Git - empty

Just for the further reference, here is my Git repository for this case:

Create a new Git repository

As it is also shown in instructions, there are two options for providing required URL, HTTPS or SSH. In my example, I am using HTTPS, but either of two URLs can be used:

URL HTTPS

URL SSH

Once URL has been copied into Git Repository URL and Branch Name provided, i.e. main (assuming this is main branch), setup can continue.

Initialize Git - complete

On the next page of this setup steps, user profile is required. I am using a new profile which we will define in this step. Besides profile and user name (for connection to Git), password is required. This actually isn't the password to login into Git, but Personal Access Token, which is generated for the suser that is logging into Git.

Here are the steps to generate Personal Access Token:

In Git, navigate to user's Settings and then to Developer Settings. Open Personal access tokens and then click on Fine-grained tokens.

Git - Developer Settings

Click Generate new token.

Git - Generate token

Provide a new token name, set expiration date, optionally define for which repository is this token valid, and then click Generate token.

Git - Copy token

When token is generated, copy it into clipboard. Use this token and fill the password field in Initialize Git popup window.

Git - Finish initializing token

After a couple of seconds, Git is initialized.

Git Initialized

The results of Git initialization can be now reviewed in you Git environment, Github in my case:

Updated Git repository

As you can see there are four folders created which replicate Semantic Modeler content:

  • three folders for each layer of semantic model: physical, logical and presentation,
  • additional folder for variables.

Drilling down the folder structures shows semantic model structure and its definitions in SMML (JSON). When comparing with Semantic Model that resides in OAC, we can see that the content is exactly the same.

Model in Semantic modeler

Model in Git

There is also one minor detailed available for inspection in Oracle Analytics' Semantic Models list - for the model that we initialised Git repository, connection to the Git repository is now displayed:

Model in Git

And detailed description of connection is available as well:

Semantic Model definition

Conclusion

This short use case shows how can we set connection between Semantic Modeler and Git repository. In the next few posts, we will take a look at some examples of using Git with Semantic Modeler, for example:

  • migrating semantic models between environments,
  • multi-user development environment,
  • model versioning.