Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples and documentation for QlikView #18

Merged
merged 6 commits into from
Nov 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# Server Side Extension

This repository provides a server-side extension (SSE) protocol based on gRPC that allows you to extend the Qlik built-in expression library with functionality from external calculation engines. You can use external calculations engines from both load script expressions and chart expressions. These SSE plugins are referred to as analytic connections in Qlik Sense.
This repository provides a server-side extension (SSE) protocol based on gRPC that allows you to extend the Qlik built-in expression library with functionality from external calculation engines. You can use external calculations engines from both load script expressions and chart expressions. These SSE plugins are referred to as analytic connections by Qlik.
SSE is part of the Advanced Analytics Integration (AAI) concept at Qlik.
This repository includes documentation that describes the SSE protocol, how to use it and how to build your own plugins. Currently we have examples written in a few different languages only but examples in more languages will come later.

## Status
[![CircleCI](https://circleci.com/gh/qlik-oss/server-side-extension.svg?style=shield)](https://circleci.com/gh/qlik-oss/server-side-extension)

**Current Plugin Version and State:** v1.0.0
**Matching Qlik Sense Version:** Qlik Sense 2017 release (or later). Both desktop and enterprise.
**Examples:** The examples provided are not meant to be used in production, therefore **no support is provided**.
**Matching Qlik Sense Version:** Qlik Sense June 2017 release (or later). Both desktop and enterprise.
**Matching QlikView Version:** QlikView November 2017 (or later). Both desktop and server.
**Examples Disclaimer:** The examples provided are just examples, therefore **use them at your own risk**.

[Previous Versions](docs/versions.md)

## Documentation

* [Overview](docs/README.md)
* [Communication flow](docs/communication_flow.md)
* [Generating certificates](generate_certs_guide/README.md)
* [Configuring SSE plugins in Qlik Sense](docs/configuration.md)
* [Generating certificates for secure connection](generate_certs_guide/README.md)
* [Configuring SSE plugins in Qlik Sense and QlikView](docs/configuration.md)
* [Writing an SSE plugin](docs/writing_a_plugin.md)
* [Protocol Documentation](docs/SSE_Protocol.md) (API reference)

Expand Down
17 changes: 7 additions & 10 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,29 @@
The Qlik server-side extension protocol is built using [gRPC - An RPC library and framework](http://github.com/grpc/grpc). To read more about gRPC, see [gRPC - A high performance, open-source universal RPC framework](http://www.grpc.io/).

Using gRPC provides a number of benefits:
- The SSE plugin (or analytic connection) can be deployed on a computer other than the one Qlik Sense is deployed on.
- The SSE plugin (or analytic connection) can be deployed on a computer other than the one Qlik is deployed on.
- You can easily create SSE plugins in any of the languages that gRPC supports out of the box (over ten languages).

The SSE protocol also makes use of [protocol buffers](https://developers.google.com/protocol-buffers/), Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data. We have specified all default values according to [Optional Fields And Default Values](https://developers.google.com/protocol-buffers/docs/proto#optional).

The following diagram shows an example of SSE plugins communicating with Qlik Sense:
The following diagram shows an example of SSE plugins communicating with Qlik:

![](SSE_overview.png)

**Note:** In the context of SSE communication:
- Qlik Sense is the **client**
- Qlik is the **client**
- The SSE plugin (Python, etc.) is the **server**.

This means that the server (that is, the plugin) must be started and running before Qlik Sense is started.
This means that the server (that is, the plugin) must be started and running before the Qlik engine is started.

## Considerations
* **Potential bottleneck**
SSE plugins will feel slower than the normal Qlik engine calculations that use in-memory data. SSE plugins may also become a bottleneck if massive usage is applied (many measures, many users, many apps, a lot of data), so be sure to architect your SSE deployment very carefully.

* **Order of rows (data) sent from Sense**
The order of the data sent to the SSE plugin may not be the same as the order you see in the visualization. It is up to you as a developer to preserve the order when you return the values from the plugin to the Qlik Sense client.
* **Order of rows (data) sent from Qlik**
The order of the data sent to the SSE plugin may not be the same as the order you see in the visualization. It is up to you as a developer to preserve the order when you return the values from the plugin to the Qlik client.

* **Recovering lost connection**
If the connection to the plugin is lost, Qlik Sense attempts to reconnect after 20 seconds by default. You can configure a different timeout interval in QMC.

* **New log file**
You will see a new type of log file in the Qlik Sense engine logs containing SSE-specific information.
If the connection to the plugin is lost, the Qlik engine attempts to reconnect after 20 seconds by default. You can configure a different timeout interval in QMC.

For more information, see [Limitations](limitations.md).
2 changes: 1 addition & 1 deletion docs/communication_flow.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Communication flow

The following diagram demonstrates the communication between the Qlik Sense client, the Qlik engine service, and the SSE plugin:
The following diagram demonstrates the communication between the Qlik Sense client, the Qlik engine service, and the SSE plugin (the communication between _QlikView_ and the SSE plugin works in the same way):

![](SSE_communication_flow.png?raw=true)

Expand Down
17 changes: 14 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
# Configuring SSE plugins in Qlik Sense
# Configuring SSE plugins in Qlik

You must configure SSE plugins, referred to in Qlik Sense as analytic connections, in the Qlik Management Console (QMC) or using the Qlik Repository Service API. After you add a new analytic connection, you must restart the Qlik engine.
## Qlik Sense
You must configure SSE plugins, referred to by Qlik as analytic connections, in the Qlik Management Console (QMC) or using the Qlik Repository Service API. After you add a new analytic connection, you must restart the Qlik engine.

For an overview of analytic connections, see __Analytic connections__ the Qlik Sense Developers help:
For an overview of analytic connections, see __Analytic connections__ in the Qlik Sense Developers help:
[https://help.qlik.com/en-US/sense-developer/June2017/Content/AnalyticConnections.htm](https://help.qlik.com/en-US/sense-developer/June2017/Content/AnalyticConnections.htm)

For instructions for adding a new SSE plugin in QMC, see __Creating an analytic connection__ in the Qlik Sense help:
[https://help.qlik.com/en-US/sense/June2017/Subsystems/ManagementConsole/Content/create-analytic-connection.htm](https://help.qlik.com/en-US/sense/June2017/Subsystems/ManagementConsole/Content/create-analytic-connection.htm)

For information about SSE plugins for Qlik Sense Desktop, see __Configuring analytic connections in Qlik Sense Desktop__ in the Qlik Sense help:
[http://help.qlik.com/en-US/sense/June2017/Subsystems/Hub/Content/Introduction/configure-analytic-connection-desktop.htm](http://help.qlik.com/en-US/sense/June2017/Subsystems/Hub/Content/Introduction/configure-analytic-connection-desktop.htm)

## QlikView

You must configure SSE plugins, referred to by Qlik as analytic connections, by editing the settings.ini file (either for QlikView Server or QlikView Desktop). After you add a new analytic connection, you must restart QlikView.

For an overview of analytic connections, including how to add a new SSE plugin, see __Analytic connections__ in the QlikView help:
[https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Analytic_connections.htm](https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Analytic_connections.htm)

For step-by-step instructions on how to get started with SSE in QlikView, see __Get started with analytic connections__ in the QlikView help:
[https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Getting-started-with-analytic-connections.htm](https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Getting-started-with-analytic-connections.htm)
21 changes: 7 additions & 14 deletions docs/limitations.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
# Limitations in this version of SSE plugins

#### Syntax warnings and errors (Qlik Sense Limitation)
- The functions that the SSE plugins provide may not show up properly in the data load editor (script editor) in Qlik Sense which means the intellisense may complain about it and show errors, even though it works just fine to execute.
- Error handling not working when _more_ parameters are sent in the Ex-script functions (ScriptEvalEx, ScriptEvalExStr, ScriptAggrEx and ScriptAggrExStr) than data types specified(first parameter stating the data types for each parameter of data). Currently you will get stuck with a "spinning wheel" in that object which requires you to shut down the plugin and then restart, alternatively restart engine. For example: trying to evaluate `Script.ScriptEvalEx('D', 'args[0][0]', Mixed, Numeric)` will reproduce this issue because only one data type, the 'D' parameter, is stated but two parameters are sent: _Mixed_ and _Numeric_. The _correct_ syntax would be `Script.ScriptEvalEx('DN', 'args[0][0]', Mixed, Numeric)`, with matching number of specified data types and given parameters. See the _Script evaluation_ section in [Writing an SSE plugin](writing_a_plugin.md) for more information about script functions.
#### Returning data to Qlik
There is no support for returning several columns or higher-order data, to Qlik than was sent to the plugin. The cardinality of the response from the plugin must be the same as sent from Qlik.
- If less rows, or lower cardinality, is sent back from the plugin, Qlik will add null values to match the number of rows sent from Qlik to the plugin originally. Note that the mapping may not work as intended if less data is sent back.
- If higher-order data is sent back, either too many rows or more than one column, Qlik will neglect the additional data and only take the first _n_ rows in the first column, assuming _n_ is the number of rows sent to the plugin. Note that the mapping may not work as intended if more data is sent back.

#### Returning data to Qlik Sense
There is no support for returning several columns or higher-order data, to Qlik Sense than was sent to the plugin. The cardinality of the response from the plugin must be the same as sent from Qlik Sense.
- If less rows, or lower cardinality, is sent back from the plugin, Sense will add null values to match the number of rows sent from Sense to the plugin originally. Note that the mapping may not work as intended if less data is sent back.
- If higher-order data is sent back, either too many rows or more than one column, Qlik Sense will neglect the additional data and only take the first _n_ rows in the first column, assuming _n_ is the number of rows sent to the plugin. Note that the mapping may not work as intended if more data is sent back.

#### Load script data cardinality (Qlik Sense Limitation)
#### Load script data cardinality (Qlik Limitation)
There is no support for tensor calls from the load script. Only scalar and aggregation calls are supported.

#### Changes to plugins require engine restart (Qlik Sense Limitation)
If you add, remove, or change a plugin, you must restart either the engine service (for Qlik Sense Enterprise) or Qlik Sense Desktop.
#### Changes to plugins require engine restart (Qlik Limitation)
If you add, remove, or change a plugin, you must restart the Qlik engine. For Qlik Sense this means either the engine service (for Qlik Sense Enterprise) or Qlik Sense Desktop. For QlikView, you must restart the QlikView Server service or QlikView Desktop.

It is only during engine startup that the `GetCapability` plugin method is called.

#### QlikView
SSE is not supported in QlikView yet. We are planning to release SSE support in QlikView during 2017-H2.
3 changes: 2 additions & 1 deletion docs/planned_improvements.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Planned improvements
- We are planning to release SSE support in QlikView during 2017-H2.

-Currently we only return one column of values (or one value) back to Qlik since Qlik is not capable of treating more columns in a single response. We are working on implementing support for returning a complete table (or matrix) in a response to Qlik. In Qlik this will be used from the load script to start with.
9 changes: 5 additions & 4 deletions docs/versions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Released Versions
This page maps all released SSE versions with the appropriate Sense version. See the [Changelog](CHANGELOG.md) for more detailed information.
This page maps all released SSE versions with the appropriate Qlik versions. See the [Changelog](CHANGELOG.md) for more detailed information.

| __SSE Version__ | __Qlik Sense Version__ | __QlikView Version__ |
| ----- | ----- | ----- |
| [v1.0.0](/~https://github.com/qlik-oss/server-side-extension/releases/tag/v1.0.0) | Qlik Sense June 2017 release | QlikView November 2017 release |

| __SSE Version__ | __Sense Version__ |
| ----- | ----- |
| [v1.0.0](/~https://github.com/qlik-oss/server-side-extension/releases/tag/v1.0.0) | Qlik Sense June 2017 release |
Loading