Qlik Community

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
QLIKWORLD LIVE! MAY 16 - 19TH, EARLY BIRD DISCOUNTS! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
chaitanyajami
Partner
Partner

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
tomlcart
Contributor III
Contributor III

chaitanyajami
Partner
Partner
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

ost
Contributor III
Contributor III

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
Partner
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
Partner
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
Partner

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