Skip to main content

Suggest an Idea

Vote for your favorite Qlik product ideas and add your own suggestions.

Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW

Sense Task parameter passing

AndrewMcIlwrick
Luminary Alumni
Luminary Alumni

Sense Task parameter passing

QlikView QMC allows you to create tasks with parameters that are passed into script variables - this should also be possible in Qlik Sense task.

14 Comments
sergio_loza
Partner - Contributor III
Partner - Contributor III

I second this. It apparently was available in Qlik View. It would make things so much better

Anonymous
Not applicable

Totally agree! Just for those who don't remember QlikView - here's how this feature looks like:

 

rva_heldendaten_1-1600783942937.png

 

 

mountaindude
Partner Ambassador
Partner Ambassador

Yeah I totally agree.

I would think this will arrive sooner or later in the core Qlik Sense Enterprise product, but not wanting to wait I created an alternate solution for this.
It solves my needs in this space but there are of course room for improvement too.

The solution is built around a generic key-value store, which is included in recent versions of the open source Butler service (butler.ptarmiganlabs.com).

The idea is pretty simple:

  • You first insert into the key-value store whatever parameters you want to pass to a an app's load script. This is done by calling Butler's REST API, either using some 3rd party tool outside of Sense (database, upstream data source, Powershell etc) or from another Sense app using a "Call AddKeyValue()" call.
  • The second app then reads the keys where parameters are stored, and voila - we have parameter passing between apps as well as from outside world into an app.

 

Like this:

mountaindude_0-1612359313099.png

True, you will have to set up and run Butler for this to work. But it's open source (free) and runs nicely even on the existing Sense servers. You also need to add some script lines for inserting the parameters, but it's literally just a few lines of script:


Write values to key-value store from the first app...

// Create key-value pair in Butler's key-value store. 

Call NiceTrace('---------------------------')
Call NiceTrace('Writing parameter to Butler key-value store. No time-to-live (ttl).')
Call AddKeyValue('Reload chain parameter demo', 'Parameter 1', 'a1 abc 123', 0)

Call NiceTrace('Written parameter to key-value store: ')
Call NiceTrace('Namespace="Reload chain parameter demo", Key="Parameter 1", Value="a1 abc 123"')

 

...then read them back from the second app

// Define variable to store the retrieved parameter in
let vParam1='';

Call NiceTrace('---------------------------')
Call NiceTrace('Loading parameter from Butler key-value store.')
Call GetKeyValue('Reload chain parameter demo', 'Parameter 1', 'vParam1')

Call NiceTrace('Retrieved parameter value:')
Call NiceTrace('Namespace="Reload chain parameter demo", Key="Parameter 1", Value="$(vParam1)"')
set vParam1=;

 

Works quite well.

jonas_viklund
Contributor III
Contributor III

yes, this would be a great feature.

kuba_michalik1
Contributor III
Contributor III

Yeah, this is needed.

Every single workaround I saw so far (including the suggestion for Butler above) has one fatal flaw: they are scoped to the app, not to the task. There is just no way to have 1 app

So if previously you had 1 app and a task that was spitting out 10 versions based on a parameter with 10 values, or 1 app with multiple tasks specified and parametrized differently, suddenly you need 10 apps. If all the app was doing was data processing, then it's not so bad, you can minimize repetition of script via includes. If the app had actual visualizations in it... ouch.

AndrewMcIlwrick
Luminary Alumni
Luminary Alumni

You can use tags as a workaround to pass parameters.

Tags can be accessed in QS script using the JSON object the monitor app data connection provides.

Still not perfect 😉

DavidFosterVF
Creator
Creator

This has been a gap since Qlik Sense  went live.

JonasValleskog
Partner - Creator
Partner - Creator

Yes please, this is such a useful feature for reload workflow flexibility.

My current use case: designing a workflow for daily extracts and weekly extracts behaving differently. I'd like to "flip a variable switch" to force different processing behavior on the weekend.

Ian_Crosland
Employee
Employee
 
Status changed to: Open - Collecting Feedback
Stoyan_Terziev
Partner - Creator III
Partner - Creator III

4 years later and this idea hasn't yet been implemented...

I see this as a mandatory feature if we are to use QS QMC as a true dataflow management orchestrator.