QlikView/QlikSense integration with Python or R

Hi Guys

I am facing challenge in connecting QlikSense/QlikView seamlessly like we do with Tableau. Can any has worked on this, please help me?
one way is is to export output in R or Python to database then bring data to QlikView/QlikSense but I am looking for seamless integration like we have the same for R and Tableau.

Regards
Deepak

Hi @deepak9001,

There’s another way you can integrate Python & Qlikview. You could make COM modules (i.e. windows libraries) and import them in Qlikview via macros. Here’s a link with the example.

Disclaimer: I haven’t worked on Qlikview, but I’m an avid googler :slight_smile:

Hi jalFaizy,

Thanks for sharing the document but this integration is not flawless.

You could ask for a feature request on Qlikview forum. I’m sure they could help you.

@deepak9001

Here is what you can try:

  • First create your Python script and let us say you save it with a file script.py

  • Next, open the Qlikview Script Editor and paste the following code:

    Set vPythonPath = ‘C:\Users\Kunal\Canopy\User\python.exe’;
    Set vPythonFile = ‘C:\Users\Kunal\Desktop\script.py’;

    EXECUTE $(vPythonPath) $(vPythonFile)

Next, you can reload this script and overrun the security warning in case it pops up.

Let me know, if this does not work. You can integrate R scripts in similar fashion

If you want to import some data from these Python / R scripts, you can first save them in a csv file and them import them (again using the same script editor in QlikView).

Hope this helps

Kunal

Dear Kunal,

Thanks a lot for sharing valuable information.

Regards
Deepak

Hi Kunal,

I tried to run the script but it fails.Please help me. it will be great help from my side.

Hi Deepak,
Before you are trying anything from QlikView to execute a program outside of it. Please follow the steps mentioned in the below link.

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Execute.htm

I have created a small program for evenodd as below and saved it as evenorodd.py
Below is the python program

import time
num = int(input("Enter a number: "))
if (num % 2) == 0:
   print("Number is Even")
else:
   print("Number is Odd")
time.sleep(5)   

after that I have created a QlikView file using my QlikView Desktop and before that follow the steps mentioned in the first link I pasted above

Goto     to EditScript of QlikView file and add the below lines and reload the qvw file
    Set vPath = 'python.exe';    #Mention full path if environment variable is not set
    Let vFile = chr(34)&'D:\My Data\Python\Programs\evenorodd.py'&chr(34);

EXECUTE $(vPath) $(vFile);

Note: The above two variables vPath and vFile must be enclosed in Dollar Symbol
For eg $(vPath) . For some reason this editor is not showing up Dollar Symbol

Best Regards,
Kiran Kumar Cherukupally