Skip to content

Latest commit

 

History

History
87 lines (65 loc) · 7.84 KB

GetStarted.md

File metadata and controls

87 lines (65 loc) · 7.84 KB

Getting started with the Python examples

If you want to use Docker to build and run the examples, here's a quickstart.

We provide several examples at different levels of complexity, each of which is documented separately. All examples support mutual authentication. Note that the examples do not necessarily support the same functionality; therefore a function call in one example might not work in another.

The following table includes a short description of each example and the functionality it demonstrates.

Example Evaluation Data types Description
Hello world Script, function String Returns the same values as received, aggregating all values to a single string, both in script and function calls. Also demonstrates two functions with cache enabled, by default, and disabled by adding date time stamps to the end of each string value.
Column operations Script, function Numeric Adds two columns row-wise (tensor). Sums values in a column (aggregation). Demonstrates functionality both as script calls and function calls.
Full script support Script Numeric, String, Dual Full script support including SSE calls in both load-script and in chart expressions. All script functions are supported.
Full script support using Pandas Script Numeric, String, Dual Using the Pandas library and exec method to evaluate the script instead of eval. Also includes an example of writing a TableDescription in the script to be evaluated, when using the Load ... Extension ... statement. Otherwise it is the same example as the original full script support with all script functions supported.

For details about a particular example, see its documentation:

Running the Python examples

Follow these steps to quickly set up and run an example of your choice on your local machine, with an insecure connection, using either Qlik Sense Desktop, Qlik Sense Enterprise, QlikView Desktop or QlikView Server. To run several examples, or to run the examples with a secure connection or on another node, configure your system according to the instructions referenced in Configuring SSE plugins in Qlik. The <examplename>, <EngineName> and <port> referred to below are mapped to each example as follows:

Example <examplename> <EngineName> <port>
Hello world helloworld HelloWorld 50052
Column operations columnoperations Column 50053
Full script support fullscriptsupport Script 50051
Full script support using Pandas fullscriptsupport_pandas ScriptPandas 50056

Qlik Sense Desktop

  1. Install Qlik Sense Desktop (June 2017 release or later).

  2. Make sure you have Python 3.4 (or later) installed as well as the grpcio package. For more information, see Prerequisites for running the Python examples.

  3. Add SSEPlugin=<EngineName>,localhost:<port> on a new line in your Settings.ini file located at C:\Users\[user]\Documents\Qlik\Sense or C:\user\[user]\AppData\Local\Programs\Qlik\Sense\Engine. Insert the values for <EngineName> and <port> from the table above for the selected example.

  4. Copy the .qvf file from the selected example folder to C:\Users\[user]\Documents\Qlik\Sense\Apps.

  5. Run the corresponding <examplename> python package. The easiest way to do this is to open a command prompt, go to the example\python folder and type:

    python <examplename>

    Insert the value for <examplename> from the table above for the selected example.

  6. Start Qlik Sense Desktop and open the app for the example you chose.

Qlik Sense Enterprise

  1. Install Qlik Sense Enterprise (June 2017 release or later).

  2. Make sure you have Python 3.4 (or later) installed as well as the grpcio package. For more information, see Prerequisites for running the Python examples.

  3. Add the SSE plugin settings in QMC under Analytic connections by inserting the following values: name: <EngineName>, host: localhost, port: <port>

    Alternatively, add SSEPlugin=<EngineName>,localhost:<port> on a new line in your settings.ini file located at C:\ProgramData\Qlik\Sense. Insert the values for <EngineName> and <port> from the table above for the selected example.

    Note: Configuring the plugin via the settings.ini file is only valid for this node/machine; the settings will not be visible in the QMC. Also no access rules would apply in this case.
    Note: If you are using Sense April 2018, you can configure your plugins in QMC during runtime without having to restart Qlik engine in step 6 below. See Limitations for more details.

  4. Add the .qvf file from the selected example folder to QMC.

  5. Run the corresponding <examplename> python package. The easiest way to do this is to open a command prompt, go to the example\python folder and type:

    python <examplename>

    Insert the value for <examplename> from the table above for the selected example.

  6. Start Qlik Sense Enterprise and open the app for the example you chose.

QlikView Desktop

  1. Install QlikView Desktop (November 2017 release or later).

  2. Make sure you have Python 3.4 (or later) installed as well as the grpcio package. For more information, see Prerequisites for running the Python examples.

  3. Add SSEPlugin=<EngineName>,localhost:<port> on a new line in your Settings.ini file, below the heading [Settings 7]. Settings.ini is located at C:\Users\[user]\AppData\Roaming\QlikTech\QlikView. Insert the values for <EngineName> and <port> from the table above for the selected example.

  4. Run the corresponding <examplename> python package. The easiest way to do this is to open a command prompt, go to the example\python folder and type:

    python <examplename>

    Insert the value for <examplename> from the table above for the selected example.

  5. Start QlikView Desktop and open the .qvw file in the selected example folder.

QlikView Server

  1. Install QlikView Server (November 2017 release or later).

  2. Make sure you have Python 3.4 (or later) installed as well as the grpcio package. For more information, see Prerequisites for running the Python examples.

  3. Add SSEPlugin=<EngineName>,localhost:<port> on a new line in your Settings.ini file, below the heading [Settings 7]. Settings.ini is located at C:\ProgramData\QlikTech\QlikViewServer. Insert the values for <EngineName> and <port> from the table above for the selected example.

  4. Open the QlikView Batch Settings.ini and add the same configuration as in step 3, to be able to reload the document. The default location is C:\Windows\system32\config\systemprofile\AppData\Roaming\QlikTech\QlikViewBatch.

  5. Add the .qvw file from the selected example folder to your document root (e.g. C:\ProgramData\QlikTech\Documents) or a mounted folder.

  6. Run the corresponding <examplename> python package. The easiest way to do this is to open a command prompt, go to the example\python folder and type:

    python <examplename>

    Insert the value for <examplename> from the table above for the selected example.

  7. Start QlikView Server and open the app for the example you chose.

Configuring all Python examples at once (except Qlik Sense Enterprise)

In order to use all four Python examples in parallel, all you have to do is to map a different name to each port on the same line in Settings.ini: SSEPlugin=Script,localhost:50051;HelloWorld,localhost:50052;Column,localhost:50053;ScriptPandas,localhost:50056