Qlik Community

QlikView Documents

QlikView documentation and resources.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW

OpenCPU, R & QlikView Integration Example

Not applicable

OpenCPU, R & QlikView Integration Example

At the New York Technology Summit in May 2013, I presented a different way of integrating QlikView with R leveraging extensions and other open source technologies such as Open CPU.  This new way will allow for R functions to be centrally managed via a server (Open CPU) and be easily deployed and called by  the end users by using our ajax zero footprint browser.  Basically, QlikView will call R on demand, whenever a user makes a selection within the dashboard.  My research builds upon the previous example posted by Elif Tutuk, "Integrating QV with R example kit.zip" (http://community.qlik.com/docs/DOC-2975), the example utilizes the statconnDCOM Noncommercial API as well as Brian Bauer, "QlikView and R Integration for Predictive Analytics Example" (http://community.qlik.com/docs/DOC-3981).

My approach consist of 3 different systems integrating to each other.

1. OpenCPU: is an initiative from Jeroen Ooms and has been implemented by Stat/Dev consulting in The Netherlands.  The implementation has been supported by a Research and Development grant (WBSO) from the Dutch government.  OpenCPU sits ontop of R and makes R a restful web service where any web technology can do ajax call to R.  The benefits of OpenCPU is two folds: a. its free b. you can use their hosted solution in the cloud (basically OpenCPU wil host your R code) or you can download the software and install it on your own ubuntu server (behind your firewall).

2. The R-Project:OpenCPU comes package with R so no work is required to integrate OpenCPU with R

3. An extension within a QlikView application:  The final piece to the integration is build a custom extension within your QlikView applicaiton that sends and recieve data to/from open CPU.  I have attached a zip file below that contains the following three files:

         a. opencpuClusterAnalysis.qar: contains the QlikView extension

         b. QlikView-OpenCPU demo.pdf: explains how to get the extension to talk with open CPU (using the hosted solution)

         c. QV-OpenCPU Integration Example.qvw: is the QlikView application that needs to be deployed to the QlikView server.

Finally, below is a high level process diagram on how everything comes together.

Open CPU Architecture.jpg

Attachments
Comments
Not applicable

Hi Samuel,

Great post  - thank you.

Does this have to be installed on QV server - is there any way to run it locally?

Phil

0 Likes
Not applicable

Hey Phil,

    Thank you for the feedback.  The current extension that I publish only works with firefox therefore yes, it will need to be installed on the QV server.  However, I am in the process of updating the extension so that it can work on the QV Desktop.  Unfortunately, I do not have a timeline on when this would be updated.

I will keep you posted when I update the extension.

Sam

0 Likes
Not applicable

Samuel,

It looks like the openCPU Cluster Table in your example is tied to your dataset and mapped to your R function parameters.

I'm trying to test a linear regresson model on my own data - would I need to create a new extension (.qar) to do this?

Thanks

Phil

0 Likes
Not applicable

Hey Phil,

     That is correct.  My extension was build around the function that I deployed in openCPU.  If you were to try to test another R function such as linear regression, you would need to create a new extension to achieve this.  However, you can leverage my extension to help you in building your extension.  There will probably be a few minor changes in my extension.

Thanks,

Sam

0 Likes
danielgargiulo
Partner
Partner

Hi Samuel, The link to add the Open CPU code no longer seems to work and i am having trouble working out where to add the code on the open CPU website that i get redirected to: https://public.opencpu.org/

Any suggestions would be great.


Dan

0 Likes
Not applicable

Hey Daniel,

     Thanks for the feedback.  I have been following OpenCPU and they just release (last two weeks) a new version of their framework.  I am working on updating my document and extension to update the new api that has been published.  I should have something publish by mid September with a working example.

Thanks,

Sam

0 Likes
danielgargiulo
Partner
Partner

Hi Sam,

Thanks for the update. I look forward to seeing the updated document and example.

Kind regards,

Dan

0 Likes
Not applicable

Hi Samuel, this is very usefull. Do you have a possible date to release this update? Looking forward to speak to you.

Eliano

0 Likes
arthur_dom
Creator III
Creator III

Hi Samuel,

there is someone using it for graphics of R? Or I'll have to write a extesion to do it?

Best Regards,

0 Likes
Not applicable

hey Arthur,

    You will need to build an extension.  Matt just release one yesterday.  you can find it here http://community.qlik.com/docs/DOC-5265

Hope this help.

Sam

Version history
Last update:
‎2013-06-23 03:12 PM
Updated by: