How to use git with Qlik Sense. Part 1

Alex Polorotov
6 min readJul 9, 2020

--

It is the first article in the series about how to organize the development process in the Qlik Sense with Gitoqlik.

A version control system has never been a feature built into Qlik Sense. The lack of at least some sort of Git integration has always been a concern of mine. Copying the applications, being the usual go-to solution, almost always ends up in a piled-up workspace and complete disorganization.

‌Looking back into my web-development experience, where the Git version control system was usually a prerequisite for any project, I decided to play around with the idea of making Qlik Sense work with Git. Thus, the much needed Gitoqlik project was born with the sole purpose of filling this gap.

Git is a version-control system for tracking changes in files and coordinating work on those files among multiple people.

Our team Datanomix.pro trying to make a contribution to the Qlik Community.

Our aim was to make an easy-to-use tool that could version the visual objects and the data load script directly from the web-browser. Gitoqlik also provides the ability for developers to collaborate together and share their best practices via public or private GitHub, Gitlab, and Bitbucket repositories.

GitHub, Gitlab, Bitbucket — git hosted service providers

Here’s an example of how Gitoqlik can be used to collaborate on Qlik Sense application development.

‌Gitoqlik is a Chrome browser extension that connects Qlik Sense to GitHub, GitLab, Bitbucket, and lets you save your applications in a Git repository. Install it from web store

John, Adam and Eve

Say hello to John, Adam, and Eve.‌ John is a Qlik Sense Data Architect. Adam and Eve are amazing data visualization experts who are certified Qlik Sense Business Analysts.

This team is developing a P&L report for quite a large project:‌

  1. John is taking care of the data models and the ETL-process development.
  2. Adam and Eve are handling the visualizations and sheets for the Qlik Sense application.
  3. The team has decided to use GitHub to track the client’s requirements and to version control the application source code.‌

As the ETL process has been taken care of, John creates an application and builds out the data model for Adam and Eve to use. We’ll call this application the master application.

Data model, thanks to Vizlib for their demo app =)

John creates a GitHub repository using Gitoqlik and gives access to Adam and Eve.

Repository is a version-controlled storage space for your application and the JSON files that represents your application. This can simply be done by clicking the “Create a repository” button inside of Gitoqlik.

“Create a repository” button inside of Gitoqlik.

Gitoqlik will automatically create a master branch, which is the main branch for the repository. A branch is a specific starting state of the contents of a repository. The state can be further altered with new changes or reverted to an older version of itself.‌

As John is developing the application and the data models, he commits (saves and sends) his changes into the repository. This commit history is saved as a changeset by Git and can be restored to any previous state. John can revert changes if things in his application are not functioning properly.

A branch is a specific starting state of the contents of a repository. The state can be further altered with new changes or reverted to an older version of itself.

Master branch

As soon as John is done with his work he’s ready to pass the ball into Adam and Eve’s court. He does this by publishing his application into the “STAGE-3” stream in Qlik Sense. Adam and Eve copy the application into their workspaces.‌

They now have two copies of the master application and they will each develop their sheets. Before beginning, Adam and Eve plan to divide the work between each other.

‌Adam will be developing Pivot table sheets and ABC-analysis sheets.

‌Eve going to create the “KPI” and the Custom report sheets.

Applications

Adam needs to create an isolated branch inside the repository. This way all his changes are not recorded in the master application “master” branch but in a separate one. He uses Gitoqlik and connects to his GitHub account. Gitoqlik automatically detects copies of the application and finds the relevant master application repositories.

Create branch button

This is what the commit-graph would look like once Adam begins to work.

Adam’s commit graph
Adam’s commit-graph

Eve does the same:

Eve’s commit graph
Eve’s commit-graph

They continue to work separately on their sheets while committing to their own branches for the application.

Work in progress, Adam and Eve made commits in repository. Commit-graph
Work in progress, Adam and Eve made commits in the repository

Work in progress, Adam and Eve made commits in the repository

Once they’re both done, the team is ready to merge the branches in the master application repository. Both Adam and Eve create pull requests to merge their branches into the master branch. This is usually done through the console terminal or using standalone and IDE-bundled GUI tools. We’ll be using GitHub for this, though.

After accessing the repository page on GitHub we need to click the “Compare & pull request” button and follow the on-screen instructions.

How to create a pull request in the GitHub
How to create a pull request — 1
Create the pull request in the github
How to create a pull request — 2

Once Adam and Eve have created their pull requests John, being the repository owner and the one responsible for the master branch and merges into it, accepts Adam’s and Eve’s work. The commits become part of the master branch.

How to merge branches in the GitHub

The resulting state of the master branch contains all the changes from Adam’s branch and all the changes from Eve’s branch.

Final commit graph in the repository
Final commit-graph

John can now checkout their work to update the state of his local repository.

If you see that kind of icon you are in the out-of-date version of the application. Don’t forget to update your state.
If you see that kind of icon you are in the out-of-date version of the application. Don’t forget to update your state.

Gitoqlik will show available updates that can be applied to the master application state. To do this John clicks the “Update” button and can get the latest state of the repository and the application, which includes the work done by Adam and Eve.

So, Gitoqlik allows developers to work in isolated environments without the usual back and forth that collaboration without Git requires. The work can then be easily merged without trying to figure out which changes need to be copied where. Version control makes Qlik Sense development manageable and smart with the help of Git.

‌I hope it wasn’t a waste of your time. Stay tuned and share your ideas about the development process in Qlik Sense.

Let me know if you have any questions or/and want to use Gitoqlik in your team — my Linkedin.

P.S. Don’t forget to subscribe me on Youtube, because we have started a series of Tip&Tricks videos.

Useful links:

--

--

Alex Polorotov
Alex Polorotov

Written by Alex Polorotov

Maximizing BI adoption | Dataholyc | Qlik Partner Ambassador

Responses (1)