Master Items Management directly via Script? Some time ago it seemed to be a mission impossible, but since Qlik enabled the Server Side Extension (SSE) this is not anymore a chimera…
The legend, the man with the head Rob Wunderlich and the great Miralem Drek already gave the start and provided a basic starter project, with some useful functions, which I took as a starting point and elaborated my own version out of it. As in my Qlik spare time I have already created a complete Node.js interface to the QIX engine, it was quite simple to take over them to my first SSE.
What is an SSE?
Server Side Extension, called also SSE, are running on the server side and using a dedicated Websocket connection to interact with the QIX engine for performing external calculation from your Qlik Load Script or directly from your chart expressions. There are already plenty of example provided by Qlik and the Community in different languages, like Python, C#, R and so on…
Master Items via Script? Heh…
Yes you understood right!
QlikLab is providing you a Node.js server side interface to the QIX engine which is delivering out of the box already useful functions to create some magic. Theoretically you could build up also your own META Qlik Sense App with these functions….
MAGIC = Master Item Management !
Some of the functions available are listed below:
- Creation of Master Measures
- Creation of Master Dimensions
- Remove Master Dimension
- Remove Master Measures
- Clear Master Dimensions
- Clear Master Measures
- Create Variable
- Get App List
- Get Stream List
- Get Master Measure List
- Ger Master Dimension List
How many times we have heard that from the Qlik consultants:
“Damn…why Qlik is not providing this capability out of the box, it would be so much useful and handy!”
Now this is reality!
The github repo is providing you the SSE extension with an asset folder, which contains the Qlik Utility App for the creation of the Master Items and some other handy functions, the QlikLab theme and the sample settings file to configure with your Qlik Sense Desktop environment. Alternatively you can deploy it own the Qlik Sense server following the official Qlik instructions.
Her some useful links to the SSE topic:
How to test it out (Qlik Sense Desktop)?
- Downlaod and install Node.js
- Install npm package manager
- Clone the repo (using the Visual Studio Code terminal or cmd or powershell)
- git clone https://github.com/pamaxeed/ql-qix-sse.git
- Open the downloaded repo with Visual Studio Code or any other IDE
- Install the dependencies with the command
- npm install
- Start the Node.js SSE with the command
- node index.js
- Configure the SSE extension to be used by Qlik Sense Desktop
- Navigate to your Qlik Sense Workspace => C:\Users\YourUser\Documents\Qlik\Sense
- Modify the Settings file by adding this line
SSEPlugin=qlQixSSE, localhost: 50051;
- Run Qlik Sense Desktop
- Open the QlikLab QIX Utility.qvf
- Open the Data Load Editor and start playing around with the SSE by running the script and using the avaiable functions!
As the SSE is using a dedicated WSS connection (session), once you have have executed your script you have to refresh the browser to be able to see the changes in the Master Item Section! Basically your Qlik Sense Desktop connection (WS) has to be refreshed (hint: do not open multiple tabs)…
Please I beg you, let me know what you would like to add in this package, or even better give your own contribution, re-factor the code and add some other nice capabilities! I will also add and create a video to show how to use this SSE extension…
Soon also available on the Qlik Branch site!…