Doing your Qlik App Configuration in the load script, include files, or QMC (Publisher or the Qlik Repository Service APIs)?

March 17, 2018

For me, the bare minimum when it comes to app configuration in Qlik Sense or QlikView is:
- Setting paths and libs for use in data load script
- Setting "boilerplate" variables - e.g. the number/date/currency/etc formats
- Setting HidePrefix, SearchIndex and other app-specific behaviours
- Setting Product or Customer specific settings for consumption in the UI

This post adds some detail on config methods for Qlik Sense and QlikView, which fills the second tab from an earlier post about versioning.

Script for setting a base library based on config variables

Script for setting a base library based on config variables

In a multi-product/customer setup (see this previous post about deployment frameworks for context) where we follow common standards for names and folder structures we can streamline this configuration to reduce the maintenance and deployment burden.

Setting config variables in a consistent way helps with questions like:
- How do I update my load statements when I move my QVD folders?
- What happens when I copy my app and want to deploy to another team or customer?
- How do I migrate the app between environments, or set them to use different folder paths on a common share (e.g. _dev, _test, _prod)?

Qlik Sense

In Qlik Sense, we can pass these variables in three ways:
1 - Set them in the data load editor for each application (simple, but needs to be done for every application and each time an app is migrated)
2 - Set them in an external text file, which is loaded via MUST_INCLUDE into the apps on reload (less simple, allows config to be shared amongst apps, requires editing of a text file on disk)
3 - Set custom properties and tags on apps via the Qlik Sense QMC (more complex, but each app can have a custom config, and no in-app or on-disk edits are required)

An example app carrying a tag, and two custom properties. These can be accessed by the app.

An example app "My Config App" carrying a tag, and two custom properties. These can be accessed by the app and used to build variables.

I'll cover the implementation detail in a later post, as option 3 provides a really powerful method for setting up apps. This uses the monitoring app REST connections (current versions as per this previous post) to get data from the Qlik Repository Service.

QlikView

In QlikView, the first two methods are the same, with the third being slightly different:
3 - Set a configuration variable via the QlikView QMC (requires Publisher, limited to 1 variable if only 1 output QVW required) in "Script Parameters".

Variable setup in the QMC

Variable setup in the QMC

I'll cover an example for this one in a following post.


Profile picture

From Dave, who writes to learn things. Thoughts and views are his own.

© 2024, withdave.