With analytic connections you are able to integrate external analysis with your business discovery. An analytic connection extends the expressions you can use in load scripts and charts by calling an external calculation engine (when you do this, the calculation engine acts as a server-side extension (SSE)). For example, you could create an analytic connection to R, and use statistical expressions when you load the data.
Creating an analytic connection
For both QlikView Desktop and QlikView Server (QVS) , analytic connections are configured by editing the Settings.ini
QlikView Server must be stopped before editing the Settings.ini file.
After adding new connections or changing existing connections, a restart is required for the changes to take effect.
Do the following:
- Open the file Settings.ini.
For QlikView Desktop it is located in C:\Users\username\AppData\Roaming\QlikTech\QlikView.
For QlikView Server it is located in C:\ProgramData\QlikTech\QlikViewServer.
Add the following configuration:
Where <PluginConfig> is a comma-separated list of configuration elements containing the following:
Property Description <EngineName> Name of the analytic connection. Must be unique. This is the mapping/alias to the plugin that will be used from within the expressions in the app. <EngineName> is required to use the plugin functions. For example, SSEPython for a Python plugin or R for an R plugin. <Address>
Colon-separated list with two elements:
<Host>: DNS name (or IP-adress) of the plugin.
<Port>: Port on which the plugin listens.
<PathToCertFile> File system path to the folder containing client certificates required for secure communication with the plugin. This path just points to the folder where the certificates are located. You have to make sure that they are actually copied to that folder. The names of the three certificate files must be the following: root_cert.pem, sse_client_cert.pem, sse_client_key.pem. Only mutual authentication (server and client authentication) is allowed.It is optional to set the certificate file path, but, if omitted, insecure communication will be invoked. <RequestTimeout> Integer (seconds). Optional. Default value is 0 (infinite). Timeout for message duration. <ReconnectTimeout> Integer (seconds). Optional. Default value is 20 (seconds). Time before the client tries to reconnect to the plugin after the connection to the plugin was lost.
Open the QlikView Batch Settings.ini and add the same configuration as in step 2, to be able to reload the document.
The default location is in C:\Windows\system32\config\systemprofile\AppData\Roaming\QlikTech\QlikViewBatch.
- After saving the changes in the Settings.ini files, restart QlikView. Now you can use the analytic connection by adding it through the Edit Expression dialog or the Load Script dialog.
Securing analytic connections
Consider the following best practices to strengthen the security of your QlikView environment when using an analytic connection:
- Install and run the server-side extension (SSE) plugin in a separate, isolated environment without administrator rights. To minimize harm from a malicious script, be aware of which user account is starting the plugin and what access rights this user has in the machine and in the domain.
- For enhanced security, the EvaluateScript functionality can be disabled by setting the configuration parameter allowScript to false in the SSE plugin configuration file. This will prevent arbitrary scripts from being executed and allow only predefined functions to be run by the SSE plugin.
- Application developers creating QlikView documents are advised to set any variables used in an SSE expression to a restricted format; for example, you can restrict a variable format to only numeric values.
Restrictions in using Analytic connections
Analytic connection functionality (configuring a server-side extension) is disabled when creating a new shared server object.
When an existing sheet object containing a server-side extension (SSE) expression is copied, the chart property editor is automatically disabled. This means that the chart properties are no longer editable.
The following examples show how to set a server-side extension (SSE) plugin. Here, a Python plugin is used and one or multiple servers are defined.
- One SSE plugin server: SSEPlugin=SSEPython,localhost:50051
- Two SSE plugin servers: SSEPlugin=SSEPython,localhost:50051;R,localhost:50053
- One SSE plugin server is defined without certificate path but with timeouts set: SSEPlugin=SSEPython,localhost:50051,,0,20