Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
chaitanyajami
Partner - Creator
Partner - Creator

Load R dataframe into Qliksense

Hi All,

I have a requirement to load dataframe created in R into qliksense , attached is the details. can someone help me with the syntax to load the dataframe into qliksense.Thank you

Dataframe.png

Labels (1)
13 Replies
Anonymous
Not applicable

chaitanyajami
Partner - Creator
Partner - Creator
Author

Hi Carter,

Thanks for the response,in April 2018 qliksense, we can load the data from R to Qliksense without writing macros,

i would like to get help on syntax if you have idea.

asiic999
Contributor II
Contributor II

Hello, I'm just in the process, with the integration you mention (AAI), the first thing I'll do is investigate what the default functions of the connector do:

R.ScriptEvalStr

R.ScriptEvalExStr

R.ScriptEvalEx

R.ScriptEval

R.ScriptAggrStr

R.ScriptAggrExStr

R.ScriptAggrEx

R.ScriptAggr

Anonymous
Not applicable

Hi chaitanya‌!

Based on your post I'm not sure on how familiar you are with SSE (Server Side Extensions). Have you taken a look at the R-plugin (https://github.com/qlik-oss/sse-r-plugin)? There is a Get Started guide in the repo explaining how to configure the plugin and run the examples provided. If you're not familiar with SSE I recommend you to first take a look at our main repository (https://github.com/qlik-oss/server-side-extension) before looking into the R-plugin example, which explains the protocol and its functionality as well as provides examples in different languages.

Kind regards,

Josefine

chaitanyajami
Partner - Creator
Partner - Creator
Author

Hi Josefine,

Thank you,i have installed SSER Plugin in qliksense setup, dont know how start extacting this data frame into qliksense. i just need to bring data in to sense, thats it

vasil_gutev
Contributor
Contributor

Hi ,

try this way:

emp_data:

Load*

Extension R.ScriptEval('emp.data;');

chaitanyajami
Partner - Creator
Partner - Creator
Author

Hi Vasil,

iam getting below error, do you have any idea what could be done. all the services are up and running.

error.png

vasil_gutev
Contributor
Contributor

Hi Chaitanya,

please check all of the columns data types and convert them to string, because some R data types aren't supported in Qlik. Later in Qlik Sense you can convert them again to "Date" and "Num".

yannick_c
Partner - Contributor III
Partner - Contributor III

Hello,

I don't think you can load directly a data frame from R to Qlik Sense, maybe you should try to export your data in csv.

Please find how I load data frame with the Iris data:

First I am importing the CSV file

[Iris]:

LOAD

   *

FROM [lib://Data/Iris.csv]

(txt, codepage is 28591, embedded labels, delimiter is ',', msq);

Then I load this table in an other table to create cluester

[Cluster]:

Load *

Extension

R.ScriptEval('

          X <- cbind(q$sL,q$sl,q$pL,q$pl)

          Cluster = kmeans(X, centers = 3, nstart=20)$cluster

          data.frame(Id = q$Id, Cluster);

',Iris{Id,sL,sl,pL,pl});

Hope it'll help

Regards