🌴 Qlik Sense task trees using Ctrl-Q

Qlik Sense lacks a good built-in viewer for task dependencies. Ctrl-Q address this by offering a cross-platform tool for visualising Sense task trees, including latest execution result.

🌴 Qlik Sense task trees using Ctrl-Q
A Qlik Sense task tree

Ctrl-Q is the latest open source tool from Ptarmigan Labs, available from https://github.com/ptarmiganlabs/ctrl-q. That is also where you find all documentation and downloads related to Ctrl-Q.

The tool is an attempt at automating otherwise complex, error prone or time consuming tasks that an admin (or advanced developers) of client-managed Qlik Sense might face.
After all, who likes to spend hours doing the same thing over and over again? Especially if it can be automated to a single execution of an easy to use tool?

Enter Ctrl-Q.

One of its features is to retrieve information about reload tasks from Sense. This task info can be exported/imported from/to Sense (more about this here), but it can also visualise all task info in a tree view.

Colors, anyone?

There is plenty of fine tuning that can be done, for example adding colors to the task tree and include more or less details about the tasks in the tree view.

Ctrl-Q is a command line tool and as such it relies on the terminal applications of the host operating system. On Linux and macOS the terminal apps are very mature and feature rich.

On Windows... not so much. "cmd.exe" has been around in Windows Server for decades. Sure, PowerShell is very powerful in its scripting capabilities, but it also introduced its own scheme for using colors, for example.

That began to change back in 2017 when work on "Windows Console Colortool" was started. The idea was to bring better color support to the Windows console/terminal tools.
Fast forward a few years and that tool has morphed into Windows Terminal, an actively maintained tool from Microsoft.
Color/layout handling etc works the same way as in Linux and macOS.
From the project's GitHub page.

Windows Terminal is a new, modern, feature-rich, productive terminal application for command-line users. It includes many of the features most frequently requested by the Windows command-line community including support for tabs, rich text, globalization, configurability, theming & styling, and more.

In the context of Ctrl-Q this means we can get nicely formatted output also on Windows (both server and desktop variants).

Allright, let's look at some examples. The command below assumes you have a subdirectory called "cert" in which there are valid certificates exported from Qlik Sense. The red/white annotations are added for reference.

./ctrl-q.exe task-get `
--auth-type cert `
--auth-cert-file .\cert\client.pem `
--auth-cert-key-file .\cert\client_key.pem `
--host `
--auth-user-dir Internal `
--auth-user-id sa_api `
--output-format tree `
--output-dest screen
No-color Qlik Sense task tree 

That works, but we can do better.

Add the --tree-icons option to show a status emoji for each reload task, indicating how the last execution went (success, failed, aborted etc).
The --text-color yes then adds color and emoji support to the task names.

Task tree with colors and status icons

Attention to detail

The task tree above does its job, but there is plenty of info for each task that's not visible in that tree.

The --tree-details option can be used to address this.
It takes zero or more parameters. Each parameter represent one block of info that will be added to the tree output.
Valid parameter values are taskid, laststart, laststop, nextstart,
appname, appstream.

Let's add that option with no additional parameters, which means "include all info for the tasks". We now get things such as task ID, last start/stop, app name, app stream and more. The task name in high-contrast white and supplementary info in more discrete grey:

.\ctrl-q.exe task-get `
--auth-type cert `
--auth-cert-file .\cert\client.pem `
--auth-cert-key-file .\cert\client_key.pem `
--host `
--auth-user-dir LAB `
--auth-user-id goran `
--output-format tree `
--output-dest screen `
--tree-icons `
--text-color yes `
Color task tree with complete set of info for each task.

Wrapping up

Maybe the standard QMC will one day include a task tree, similar to what's available in QlikView. Or not - time will tell.

Either way, for now Ctrl-Q provides a way to visualise task relationships and hierarchies for administrators of client-managed Qlik Sense environments.