GithubHelp home page GithubHelp logo

qlik-oss / sse-r-plugin Goto Github PK

View Code? Open in Web Editor NEW
66.0 26.0 73.0 1.34 MB

A Qlik server-side extension plugin for accessing R.

License: MIT License

C# 99.39% Batchfile 0.61%
qlik csharp r advanced-analytics-integration

sse-r-plugin's Introduction

SSE R-plugin

This repository provides a server-side extension (SSE) that allows you to extend the Qlik built-in expression library with functionality from R. You can use this in both load scripts and charts. In Qlik Sense and QlikView, you connect to this SSE R-plugin by defining an analytic connection.

R is not a supported language in gRPC by default. The purpose of this repository is therefore to provide an SSE, written in C# and is called SSEtoRserve, that accesses Rserve to be able to run R scripts. All documentation and guides regarding SSE in general, referred to as server-side-extension, are valid and useful for this plugin as well.

Status

Latest Version: v1.2.1 (using SSE protocol version v1.1.0)
Disclaimer: Use it at your own risk. See License.

All Versions

Documentation

See the docs folder and the general SSE repo (server-side-extension).

Build and Run the R-Plugin!

Security

General Security Attention

Since R scripts can be very powerful and you will never know what R script will be executed (when EvaluateScript method is called from the client) by this plugin and the R installation, you must be extra careful to secure the machine that this plugin and the R installation are deployed to as much as you can. If possible, sandbox the execution. Be aware of which user account that is starting the plugin and R installation and what access rights this user got in the machine and in your domain to minimize any harm a malicious script can cause.

To be in full control, the EvaluateScript functionality can be disabled by setting the config param allowScript to False in the SSEtoRserve config file. See Configure SSEtoRserve for more info.
Instead you can define the functions that should be available in this SSEtoRserve plugin together with predefined R scripts that cannot be changed by the client (Qlik). See Defining and using your own functions for more info.

Secure connection using certificates

Enable secure connection between the plugin server and Qlik by enabling mutual authentication. See the folder generate_certs_guide that explains how to generate proper certificates. This can be found in the general SSE repo (server-side-extension).

Limitations

Changed Plugin Configuration (Qlik Limitation)

  • If you make changes to the plugin config or add/remove plugins you have to restart the Qlik engine (i.e. restarting the Desktop process for Qlik Sense Desktop and QlikView Desktop, and restarting the Qlik Sense Engine Service or QlikView Server Service for server version). It is only during Engine startup that Qlik connects to the plugin and calls the GetCapability plugin method to see what the plugin is capable of and which functions that are available.

License

See LICENSE.txt. Also have a look at NOTICE.txt.

Contributing

Please follow the instructions in CONTRIBUTING.md.

sse-r-plugin's People

Contributors

joesiltbergqlik avatar josefinestal avatar kjartan-qlik avatar qlik-aoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sse-r-plugin's Issues

Error while using R.ScriptEval()

Description

I am using R.ScriptEval() to perform clustering analysis using a source R file and assign colors to data points.

From plugin console, I can see that:

  • I connected to R plugin
  • Successfully executed the R script
  • But failed to receive response from plugin

Steps to Reproduce

expression in in Qlik to assign color to data points in a scatter plot

R.ScriptEval('source("/path/POC_Predict.R")', [param1] as param 1, [param2] as param 2, ... [paramn] as param n)

# read params passed by R.scriptEval()
# do something
# last line of the R Script
as.data.frame(response$predict)
Expected behavior

data points are colored as per the cluster index received from R

Actual behavior

Error:
I see the following error in plugin console log:

2018-03-22 18:42:31.0128|INFO|SSEtoRserve.RServeEvaluator|Rserve result: 2 rows, hashid (41876889) 2018-03-22 18:42:31.0128|DEBUG|SSEtoRserve.RServeEvaluator|Rserve result column names: value, visible 2018-03-22 18:42:31.0128|DEBUG|SSEtoRserve.RServeEvaluator|Rserve result nrOfCol umns: 2 2018-03-22 18:42:31.0128|WARN|SSEtoRserve.RServeEvaluator|Rserve result, column data type not recognized: RserveCLI2.SexpList

Environment

Plugin is installed on a Windows VM

Operating system where the SSE plugin is deployed
[x] Windows
[ ] Linux
Qlik Sense
[ ] Desktop
[x] Server

Versions

  • sse-r-plugin: Qlik Sense February 2018 | v1.1.0
  • Qlik Sense: QS Nov 2017.
  • Operating system: Windows Server 2012 R2
  • [Other relevant versions]
    I am running R server and SSE plugin on a different VM, the sample k-mean clustering example with iris data is working fine, please let me know if you any other details.

Thanks in advance.

Support for lp() function

Description

Hi, My R script is giving me an expected result through RStudio but when I use the same script through the Qlik Sense Load Editor, it is giving me an error saying there might be NA/NaN in the data being passed.

Steps to Reproduce

library(xlsx);
library(lpSolve);
q = read.csv(file = 'var140.csv', header = FALSE)
q = as.data.frame(q);
Constraint = q[2:168,1:140];
OBJ = t(q[2:141,142]);
RHS = t(q[2:168,141]);
BackToGeo = (lp("max", OBJ, Constraint, "<=", RHS, compute.sens = TRUE))$solution;
BackToGeo;

Expected behavior

A result vector of size 140 to be returned.
[What you expected to happen]

A result vector of size 140 to be returned.

Actual behavior

Argument 3 returns NA/NaN/Inf error

Environment

Qlik Sense Desktop

Operating system where the SSE plugin is deployed

Windows 10

Qlik Sense

Desktop
[ ] Desktop
[ ] Server

### Versions
Qlik Sense Desktop February 2019
* sse-r-plugin: 1.2.1
* Qlik Sense: February 2019
* Operating system: Windows 10
* [Other relevant versions]

[var140.zip](https://github.com/qlik-oss/sse-r-plugin/files/3402631/var140.zip)

Error in Qlik Sense

Description

Getting an error in Qlik Sense

image

Steps to Reproduce

  1. Followed all the steps as per the instructions. All seems to be ok.

image

image

  1. Uploaded a similar Titanic .csv file in the Qlik Sense script
    image
Expected behavior

Expected that there would be no errors in Qlik Sense

Actual behavior

Error message

Environment

Operating system where the SSE plugin is deployed
[ ] Windows
[ ] Linux
Qlik Sense
[ ] Desktop
[ ] Server

Versions

  • sse-r-plugin:
  • Qlik Sense:
  • Operating system:
  • [Other relevant versions]

Data Table Issue

Description

Hello, I am successfully using the SSE-R-PLUGIN in Qlik Sense. However, I reckon there might be a glitch when passing some Qlik data to R and back in a data table.

My goal is very simple. I have a Variable, say Var1, with values 1 to 10. I put this variable in the first column of my data table. Then I select the second row and simply pass Var1 to R and back (identity). I expect a second column, say VarR, to be a copy of Var1, but Qlik shows an error. Saving the data on the server via R then shows that some data was not completely passed from Qlik.

Steps to Reproduce

  1. Create dimension Var1 = 1, 2, 3, ..., 10.
  2. Pass Var1 into a data table as dimension.
    image
  3. Open a second column VarR and add the following code: =R.ScriptEvalEx('N', 'q$v1', Var1 as v1) -> Qlik shows an error.
  4. Change the code of VarR as follows: =R.ScriptEvalEx('N', '1:10', Var1 as v1) -> Works and shows a copy of Var1.
  5. Change the code of VarR as follows: =R.ScriptEvalEx('N', 'saveRDS(q$v1, "test_data.rds"); 1:10', Var1 as v1) -> Gives a weird output for VarR with all 1s. In addition, the stored data in the backend is NULL.
    image
    image
Expected behavior

Qlik sends all data to R and back. A second column VarR appears with the same values as Var1.

Actual behavior

An error in Qlik. No data transmitted to R.

Environment

Operating system where the SSE plugin is deployed
[ X] Windows
Qlik Sense
[ X] Desktop

Versions

  • sse-r-plugin: 1.1.0
  • Qlik Sense: 14.20.10
  • Operating system: Windows Server 2019
  • R: 4.0.2

Load custom function will result: Rserve error: Object reference not set to an instance of an object.

Hello,

when I trying to load/add a custom function in the plugin the plugin return on every call:
"WARN|SSEtoRserve.RServeEvaluator|Rserve error: Object reference not set to an instance of an object."

I setup function definition file
<setting name="functionDefinitionsFile" serializeAs="String"> <value>.\FuncDefs.json</value> <!-- Set to i.e. .\FuncDefs.json to add your own defined SSE functions. The file contains the description of the functions. --> </setting>

This works with default functions as well with new ones created by me in the JSON-file.

But I have a complex script what I do not want do define in a JSON-file.
Therefore I saved the script in a R-file and saved it to the machine.
When I now trying to load this on start up of the plugin:

<setting name="rserveInitScript" serializeAs="String"> <value>source("FUNCTION.R")</value> </setting>

Any request (R.ScriptAggrExStr | R.ConcatStringsTensor | or others) I send to the plugin returns the same error.

First I though I had an error in my function but even when I setup a simple function the same error occurs.
e.g.
myFunction <- function(inputData) { return('done') }

Operating system where the SSE plugin is deployed
[x] Windows
[ ] Linux
Qlik Sense
[ ] Desktop
[x] Server

Versions

  • sse-r-plugin: v1.2.1
  • Qlik Sense: QlikSense June 2018
  • Operating system: Windows Server 2012 R2

Thanks & regards
Tobias

Didn´t find csharp folder

I downloaded Visual Studio 2017. I searched for the csharp folder in the SSEtoRserve plugin but its is not there. Therefore, I cannot open ServerSideExtension.sln and build a project.

Operating system where the SSE plugin is deployed
[ ] Windows

##### Qlik Sense

[ ] Desktop

### Versions

* sse-r-plugin: 1.0.0
* Qlik Sense: November 2017
* Operating system: 64-bit, x64
* R: 3.4.3

Unable to get R_DecisionTreeTitanic.qvf to work

I have installed R Server 4.2.0.

Unfortunately I'm no longer able to get the example https://github.com/qlik-oss/sse-r-plugin/blob/master/sense_apps/R_DecisionTree/R_DecisionTreeTitanic.qvf to work.

I get the error below. It seems something has changed in the d3r library. Any idea how to fix this?

Error in d3_party():
! Can't subset .data outside of a data mask context.
Run rlang::last_error() to see where the error occurred.
30: stop(fallback)
29: signal_abort(cnd, .file)
28: abort(sprintf("Can't subset %s outside of a data mask context.",
format_arg(".data")), call = mask_top(call, inherit = TRUE))
27: stop_fake_data_subset(call)
26: $.rlang_fake_data_pronoun(rlang::.data, response)
25: rlang::.data$response
24: eval_tidy(expr, context_mask)
23: eval_context(expr, context_mask)
22: walk_data_tree(new, data_mask, context_mask)
21: reduce_sels(node, data_mask, context_mask, init = init)
20: eval_c(expr, data_mask, context_mask)
19: walk_data_tree(expr, data_mask, context_mask, error_call)
18: vars_select_eval(vars, expr, strict = strict, data = x, name_spec = name_spec,
uniquely_named = uniquely_named, allow_rename = allow_rename,
type = type, error_call = error_call)
17: withCallingHandlers(expr, simpleError = function(cnd) {
{
.handler_frame. <- TRUE
.setup_frame. <- frame
}
out <- handlers[1L]
if (!inherits(out, "rlang_zap"))
throw(out)
})
16: try_fetch(expr, simpleError = function(cnd) {
abort(conditionMessage(cnd), call = conditionCall(cnd))
})
15: with_entraced_errors(expr)
14: doTryCatch(return(expr), name, parentenv, handler)
13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
12: tryCatchList(expr, classes, parentenv, handlers)
11: tryCatch(with_entraced_errors(expr), vctrs_error_subscript = function(cnd) {
cnd$subscript_action <- subscript_action(type)
cnd$subscript_elt <- "column"
cnd_signal(cnd)
})
10: with_subscript_errors(vars_select_eval(vars, expr, strict = strict,
data = x, name_spec = name_spec, uniquely_named = uniquely_named,
allow_rename = allow_rename, type = type, error_call = error_call),
type = type)
9: eval_select_impl(data, names(data), as_quosure(expr, env), include = include,
exclude = exclude, strict = strict, name_spec = name_spec,
allow_rename = allow_rename, error_call = error_call, )
8: tidyselect::eval_select(.x, .data)
7: .f(.x[[i]], ...)
6: map(cols, ~tidyselect::eval_select(.x, .data))
5: pack(.data, !!!cols, .names_sep = .names_sep)
4: nest.tbl_df(.data, ..., .names_sep = .names_sep, .key = .key)
3: nest.data.frame(counts, data = c(rlang::.data$response, rlang::.data$freq))
2: tidyr::nest(counts, data = c(rlang::.data$response, rlang::.data$freq))
1: d3_party(rpart(survived ~ ., data = q, method = "class"))

No logging with Mono

Description

When sse-r-plugin is built using Mono there is no logging output (neither to file nor terminal). I am having trouble connecting Qlik to the plugin and it would be really helpful to have some logging information.

Steps to Reproduce

  1. Clone repository.
  2. msbuild ServerSideExtension.sln
  3. /usr/bin/mono /sse-r-plugin/csharp/SSEtoRserve/bin/Debug/SSEtoRserve.exe
Expected behavior

I expected to see logger messages like "No certificates defined. Opening insecure channel." (as we do under Windows).

Actual behavior

No logger messages (neither on terminal or to file). The only output I see is "Press any key to stop SSEtoRserve...".

Environment

Ubuntu 18.04
Mono 5.10.0.160

Operating system where the SSE plugin is deployed
[ ] Windows
[X] Linux

Versions

  • sse-r-plugin: 2335385
  • Operating system: 18.04

Installing Visual Studio 2015 is an Issue

Description

Installing Visual Studio 2015 is an Issue

Steps to Reproduce

  1. I downloaded vs2015.com_enu file into my Qlik Sense Server from Microsoft to install Visual Studio.
  2. I tried install VS 2015, Then I got following error
    image
  3. As suggested above I downloaded KB2919355 patch but when I tried to install that patch, I got a message that this patch is not applicable for your machine. I understand that this KB2919355 patch is only applicable for windows 8.1
  4. I struck in installing VS 2015.
  5. Can I complete the setup explained here by using VS 2017 community version?
Expected behavior

[What you expected to happen]

Actual behavior

[What actually happened]

Environment

Operating system where the SSE plugin is deployed
[ ] Windows
[ ] Linux
Qlik Sense
[ ] Desktop
[ ] Server

Versions

  • sse-r-plugin:
  • Qlik Sense:
  • Operating system:
  • [Other relevant versions]

Problem in working this plugin

Description

I follow all the steps but Qlik, when i load the script of R_BasicExample, return this error:

'R.ScriptEvalStr' is not a registered SSE function. Ensure the plugin is running and try restarting Qlik Engine

Qlik Sense
[ ] Desktop
[x] Server

Versions

  • sse-r-plugin:
  • Qlik Sense:
  • Operating system:
  • [Other relevant versions]

ServerSideExtension.dll is missing

Description

ServerSideExtension.dll is missing

Steps to Reproduce

  1. Launch the Build Project step in Visual Studio
  2. Get the error message "...\csharp\ServerSideExtension\bin\Debug\ServerSideExtension.dll' is missing"
Expected behavior

Get the executables located in csharp/SSEtoRserve/bin folder

Actual behavior

Error message = "...\csharp\ServerSideExtension\bin\Debug\ServerSideExtension.dll' is missing"

Environment

Operating system where the SSE plugin is deployed

Windows 7 Professionnel

Qlik Sense

Server

object of type 'closure' is not subsettable

Description

Connector reply error: grpc::StatusCode::INVALID_ARGUMENT: 'Status(StatusCode=InvalidArgument, Detail="Rserve error: Error in q$processCode : object of type 'closure' is not subsettable
")'

Steps to Reproduce

In the data load editor of the App, I put the following script:

Load 
Cod as processCode,
Sistema as subcategoriaDoServico,
word,
word_latin1,
word_utf8,
word_utf8 as check_word1
Extension R.ScriptEval('
rm(list=ls());
options(encoding = "UTF-8");
library(dplyr);
library(rvest);
library(tidyr);
library(NLP);
library(tidytext);
library(stringi);
library(stringr);
clean_text <- function(text){
  text <- gsub("[c]\\(", " ", text)
  text <- gsub("@\\w+", "", text)
  text <- gsub("https?://.+", "", text)
  text <- gsub("#\\w+", "", text)
  text <- gsub("[[:punct:]]", " ", text)
  text <- gsub("\n", " ", text)
  text <- gsub("^\\s+", "", text)
  text <- gsub("\\s+$", "", text)
  text <- gsub("[ |\t]+", " ", text)
  text <- str_replace_all(text, "NaN", "")
  return(text)
};
dfchamados <- data.frame(Cod = q$processCode, Item = q$servico, Sistema = q$subcategoriaDoServico, Titulo = q$Titulo, Descricao = q$Descricao);
text <- paste(dfchamados$Descricao, dfchamados$Titulo) %>% as.character();
text <- iconv(text,"UTF-8","LATIN1")
text <- clean_text(text);
dfchamados$fix_text <- text;
dfchamados %>%
  select(Cod, Sistema, fix_text) %>%
  unnest_tokens(input = fix_text, output = word) -> tidy_text;
tidy_text$word_latin1 <- iconv(tidy_text$word,"UTF-8","LATIN1");
tidy_text$word_utf8 <- iconv(tidy_text$word,"LATIN1","UTF-8");
print(paste0("nrows tidy_text_teor_chamado: ", nrow(tidy_text)));
tidy_text;', 
slas{processCode, servico, subcategoriaDoServico, Titulo, Descricao}
);
Actual behavior

Got this error:
Error in q$processCode : object of type 'closure' is not subsettable 1: data.frame(Cod = q$processCode, Item = q$servico, Sistema = q$subcategoriaDoServico, Titulo = q$Titulo, Descricao = q$Descricao)

gRpc communication Failure

[Description of the issue]

I have installed R and two services with Rserve and SSEtoRserve as Window service for Qlik Sense with the Analytical Toolbox. Our environment operates in multi-environment. R is only install on the repository only and not the additional servers (rim nodes).

I am getting an error code of 14 on all rim node servers which states failed to initialize gRPC commuicate for SSEPlugin R. 0 Internal engine. The service is currently unavailable. How do I get this service gRPC to communicate to all of the (rim nodes) servers?

R is up and running with the two additional service (Rserve and SSEtoRserve). Does R need to be install on all Rim Nodes?

Environment

Operating system where the SSE plugin is deployed
[ ] Windows 2016 Data Center
Qlik Sense
Qlik Sense November 2020 release and Service Patch 14

Versions

  • sse-r-plugin: 1.2.1 qlik-oss
  • sse-r- plugin-master
  • Qlik Sense: 13.10222
  • Operating system:
  • [Other relevant versions]

The Download ZIP not includes two files

Description

The Download ZIP not includes two files on csharp folder and whrn you try Build the solution on Visual Studio not works

[Description of the issue]

Steps to Reproduce

  1. [Step one]
    Open the SLN project on Visual Studio

  2. [Step two]
    The Solution Explorer show the error about missing files

Expected behavior

[What you expected to happen]
The expected is no errors showed by Visual Studio to build the Solutions

Actual behavior

[What actually happened]
The Solution Explorer show the error about missing files and when you try buld the solutions not works swhow 41 errors and 27 warnings

Environment

Operating system where the SSE plugin is deployed
[X] Windows
[ ] Linux
Qlik Sense
[ ] Desktop
[X] Server

Versions

  • grpc-sse-r-plugin: 1.0.0
  • Qlik Sense: June 2017
  • Operating system: Windows Server 2012 R2
  • [Other relevant versions]: Visual Studio 2015 Enterprise

SSEtoRserve specific functions are not recognized by Qlik Sense

Description

Hi, I've got Rserve and SSEtoRServe finally running, but it seems that Qlik Sense does not recognize the plugin specific functions such as R.ScriptAggrExStr and therefore the objects (i.e. decisiontree) are empty. Is there any way to troubleshoot / fix the problem?

Steps to Reproduce

  1. Download R and RStudio
  2. Install Rserve and other needed packages
  3. Download and build SSEtoRserve (with Visual Studio)
  4. Configure Qlik Sense Desktop for acces to the plugin (Settings.ini)
  5. Download needed Qlik extensions (i.e. decisiontree)
  6. Open the sample apps (Decision Tree TItanic and other)
Expected behavior

I expect to see the decisin tree.

Actual behavior

The objects are empty.
The data is loaded. The function script is in the object but is not read and Qlik View does not recognize it. It says there is an error in expression.

Environment

Qlik Sense Desktop, June 2017 release

Operating system where the SSE plugin is deployed
[x] Windows 10
[ ] Linux
Qlik Sense
[x] Desktop
[ ] Server

Versions

  • sse-r-plugin: v1.0.0
  • Qlik Sense: Desktop, June 2017
  • Operating system: Windows 10
  • [Other relevant versions]: Visual Studio 2017

RAM usage of SSEtoRserve question

Hi Team,

Thanks for this awesome solution to combine R with Qlik!

I have a question regarding RAM usage of SSEtoRserve and the Rserve library. I've set up a connection between R and Qlik using Rserve and SSEtoRserve, which works perfectly. I'm using R code to manipulate large amounts of data. Before running my script, Rserve and SSEtoRserve use less than 20 MB, however after running the script, they use a combined amount of RAM of 1.5GB (which does not lower over time). Is there any way to automatically flush the RAM?

Sense apps for qlik sense enterpise

Hi
I cannot import the sense apps to our Qlik Sense Enterprise.
Our version is April 2018 12.16.2
Any help
Is there any other example I can use to learn how to use R in Qlik?

Capability parameter value not available

Hi Everyone,

I am facing a issue while fetching capability first parameter value in 2nd measure call from qlik sense dektop (please note i am using execute function and creating my own capability).

For example::
I have created a capability of type aggregation with 3 param values. when we call this capability from
a chart who is having two measure, then the call for first measure works fine but in case of second measure i was not able to find the first value of capability parameter.

My capability call looks like
R.GetTotalCost(Region,Year,Country);

In case of first measure i will get all the values, but in case of second i am getting only year and country.

Please help me with this issue.

Thanks in advance.

Incorrect results with cyrillic symbols

Description

Incorrect results with cyrillic symbols.

Steps to Reproduce

When I try to use cyrillic symbols inside ScriptEvalStr function I receive unxpected result. I think that plugin passes incorrect data.

Script in QlikView:

T1:
LOAD * Inline [
Descr_,        Descr2_,              ID
адбцкон,     adbcend,               1
аебцнач,     aebcstr,                 4
абврф234,    abvrf234,              2
дбжх967,     dbjh967,                3
];

T2:
LOAD
	ID, 
	R.ScriptEvalStr('as.character(grepl("а.бц(кон|нач)", q$Descr_));', Descr_ )  as Grp,
	R.ScriptEvalStr('as.character(grepl("a.bc(end|str)", q$Descr2_));', Descr2_ )  as Grp2
Resident T1;

I got table:
ID | Descr_ | Grp | Descr2_ | Grp2
1 | адбцкон | FALSE | adbcend | TRUE
2 | абврф234 | FALSE | abvrf234 | FALSE
3 | дбжх967 | FALSE | dbjh967 | FALSE
4 | аебцнач | FALSE | aebcstr | TRUE

In cells ID =1, Descr_=адбцкон and ID =4, Descr_=аебцнач it should be TRUE as for latin set.
Plugin works with latin symbols as expected.

I checked R script in R-console and it works right:

as.character(grepl("а.бц(кон|нач)", "адбцкон"))
[1] "TRUE"
as.character(grepl("а.бц(кон|нач)", "аепцкон"))
[1] "FALSE"

Expected behavior

Right work with cyrillic symbols.

Actual behavior

Wrong result.

Environment

Operating system where the SSE plugin is deployed
[v] Windows
[ ] Linux
Qlik View
[v] Desktop
[ ] Server

Versions

  • sse-r-plugin 1.2.1.0:
  • Qlik View November 2017 SR4:
  • Operating system Windows server 2016 Standard:
    R 3.5.0

SSE-r-plugin to running

Hi All,

After building and rebuilding the solution from csharp folder, no executable found at folder csharp/SSEtoRserve/bin... Please help if i have missed any steps.

Regards
Miskin M

SSE R plugin does not load config file

Hi,

I'm having an issue with the SSE R plugin. It's perfectly working on QS as I'm able to run R functions on the charts expressions, and to use extensions that call R expressions. But now, I'm trying to implement my own functions in the "FuncDefs.json" file, but I can't. I've already set in SSEtoRserve.exe.config the path for the functionDefinitionsFile option [see snapshot below] , but it doesn't look as if it was loading the config file, because once I restart the service, I can't see in the log file that it's adding the new functions [see second snapshot]...

image
.config file modification

image
log file

Does anyone know what am I doing wrong?

Thank you so much,
Regards,
Ana

Unable to map user defined function with QLIK

Unable to map the "FuncDefs.json" file with QLIK

I am using sse-r-plugin-1.2.0-qlik-oss file and we have "FuncDefs.json" where we have created few more functions. I have installed the package jsonlite too. But still not getting the uses created function in Qlik

Steps to Reproduce

I am very new to R so do not know how to proceed the same.

Operating system where the SSE plugin is deployed
[ ] Windows



Qlik Sense

[ ] Server



* sse-r-plugin: sse-r-plugin-1.2.0-qlik-oss
* Qlik Sense: November 2107
* Operating system: Windows 2012 R2
* R version - R-3.4.3-win



<img width="594" alt="function error" src="https://user-images.githubusercontent.com/35762342/35324710-8bbbe7e2-0117-11e8-9f62-a6a4e829f96c.png">

Some of the sheets are not avaliable

Hi my friend
I've deployed the SSE on my Qlik Sense Server.However in the demo qvf,some of the sheets can display normally but some of the sheets are not avaliable.Here is the screenshot

Formula in the error sheet
R.ScriptEval('library(TTR);library(forecast);forecast(HoltWinters(q$sumRain, alpha=FALSE, beta=FALSE, gamma=FALSE), h=$(RainNumberOfYears))$fitted', Sum([rain]) as sumRain)

Error Sheet screenshot
image

Message of the error sheet in the console
image

At the same time,you can see some of the sheet are normal in the following screenshot
Normal sheet
image

Formula in the normal sheet
R.ScriptEval('library("TTR");SMA(ts(q$AgeOfDeath), n=$(SMA_NUMBER_OF_PERIODS))',[Age of Death] as AgeOfDeath)

Could someone help me solve this issue?Sincerly thanks

Loading RStudio and RServe() using the SSEtoRserve.exe.config

Hi everyone,

I'm looking to get the SSEtoRServe Plugin running automatically upon server startup. I've referenced:

https://github.com/qlik-oss/sse-r-plugin/blob/master/GetStarted.md#configure-ssetorserve

For the parameters in the config file, and gotten RStudio to load successfully using the following:

setting name="rProcessPathToStart" serializeAs="String"
value>D:\Program Files\RStudio\bin\rstudio.exe
/setting

However, I also need to initialize RServe(), which I haven't found a way to do; is there a way using the rserveInitScript parameter ? any other advice would be welcome as well.

Thanks,
Jeff

Train and Test

Hi

I was trying to perform a simple linear/logistic regression analysis using this plug-in.

I am stuck with an issue with having training set and testing set in the same code.
Could anyone help me here out.

Thanks

Can not connect to Plugin from QlikSense Nodes / other Host

Description

Can not connect to Plugin from QlikSense Nodes

Steps to Reproduce

  1. Change gRPC host in SSEtoRserve.exe.config to "0.0.0.0"
  2. Restartet SEE-plugin
  3. Restartet QlikEngine
  4. Opend port 50051 (from config)
  5. Analytic connection still works with host:localhost
  6. Changed host in analytics connection to server name and domain
  7. Restarted Engine
Expected behavior

With the change config, opend port and specific host, R should be working from all nodes and not only the central node where the plugin is runnig on

Actual behavior

After changing the host address to server and domain name (myserver.domain.com), R plugin dosen't work at all.
When changing it back to localhost, it works again from the central node

Environment

Operating system where the SSE plugin is deployed
[x] Windows Server 2012 R2
[ ] Linux
Qlik Sense
[ ] Desktop
[ x] Server

Versions

  • sse-r-plugin: v1.2.1
    testet on Qlik Sense Feb 2017 & QlikSense Apr 2018

Regards Tobias

QlikSense-R %in% filtering not working

Hello all,

I am stuck for a lot of time in a R-QlikSense issue and I would really appreciate your help.

Summary:

I am using R code into a QlikSense expression and I need to filter my table based on a CharType field "Country" using %in% function or "==".

This is working directly in RStudion locally, in RStudio on QlikSense Server but not working in QlikSense expression.
Also, this filter works fine even in QlikSense expression but when applied on numeric field.

QlikSense code:

sum(
R.ScriptEval(

'
library(ChainLadder)
library(data.table)

test_table <- data.table(Country=q$Country, Upside_volume=q$Upside_volume, Synergies=q$Synergies);

#test_table <- test_table[ test_table$Country %in% "AT" , ]  # <--- Not Working!
  test_table <- test_table[ test_table$Synergies %in% "2" , ]   # <--- Working!

final_value <- sum(test_table$Upside_volume);
print(final_value)

'
, Country as Country
, Upside_volume as Upside_volume
, Synergies as Synergies ))

I have tried multiple options, to convert directly in R script the Country field into char or vector , but without success.

It seems that it is an issue with the QlikSense - R connector which is not working properly for Characters filtering...

Thanks a lot in advance,
Silviu

Analytic Connector Name in QMC

Description

From my limited knowledge of getting this working, it seems you must name the Analytic Connector in the QMC 'R'. This should be added to the instructions.

Steps to Reproduce

  1. Follow the instructions
  2. Realize it doesn't work until you name the Analytic Connector 'R'
  3. Be happy you got it working, then mad that it wasn't in the instructions.
Expected behavior

[What you expected to happen]

Actual behavior

[What actually happened]

Environment

Operating system where the SSE plugin is deployed
[ ] Windows
[ ] Linux
Qlik Sense
[ ] Desktop
[ ] Server

Versions

  • sse-r-plugin:
  • Qlik Sense:
  • Operating system:
  • [Other relevant versions]

QlikSense unable to use R functions (appear as text)

Description

Hi guys,

Hoping you can help me out getting the SSE-R-Plugin up and running. Here's the issue:

image

In the sheet R_BasicExample, the R functions are appearing as text. It looks like Sense isn't able to connect to R - when I edit them, they just tell me the expression is invalid.

This is on QlikSense Feb 2018, Patch 1.

I run into similar problems when creating my own sheets.

I have the R analytic connection enabled:

image

RServe is running:

image

The plugin is running, and appears connected to R:

image

Note that at the bottom, there are messages about client calls when I restart the QlikSense Engine Service

The JSON Functions are also defined locally, and can be seen loading in the plugin initialization.
No certs are defined; I've tried connecting directly via the central node or using the full sense URL, same result.

Any idea what I could be missing ?

Thanks for your help !

Jeff

Environment

Windows Server 2016
x64

Operating system where the SSE plugin is deployed
[X ] Windows
[ ] Linux
Qlik Sense
[ ] Desktop
[X ] Server

Versions

QlikSense Feb 2018, Patch 1.

  • sse-r-plugin: Most recent
  • Qlik Sense: Feb 2018 Patch 1
  • Operating system: Server 2016
  • [Other relevant versions]

glm() function with error

Description

[Description of the issue]

Steps to Reproduce

  1. [Step one]
  2. [Step two]
  3. ...
Expected behavior

[What you expected to happen]

Actual behavior

[What actually happened]

Environment

Operating system where the SSE plugin is deployed
[ ] Windows
[ ] Linux
Qlik Sense
[ ] Desktop
[ ] Server

Versions

  • sse-r-plugin:
  • Qlik Sense:
  • Operating system:
  • [Other relevant versions]

Support for TLS encrypted connections to Rserve

Description

This is not an issue report. This is initially a query.
Does the SSE R Plugin support encrypted connections to Rserve?
From the conf file it appears it only supports encrypted connections to Qlik.

Steps to Reproduce

Rserve is configured to use TLS as per:
tls.key /tmp/Rserv/CA/Rserve.key
tls.cert /tmp/Rserv/CA/Rserve.crt
tls.port 6311
https://github.com/s-u/Rserve/wiki/rserve.conf

Expected behavior

SSE R Plugin establishes a TLS encrypted connection to Rserve

Actual behavior

SSE R Plugin console shows connection established to Rserve.
Error is displayed on console (apologies I don't have access to this presently can provide this error if necessary)

Environment

Operating system where the SSE plugin is deployed

Windows Server 2016

Qlik Sense

Server

Versions

  • sse-r-plugin: 1.2.1
  • Qlik Sense: February 2018
  • Operating system: Windows Server 2016
  • Rserve: 1.7-3

Git repo missing source files

Description

I cloned this repo to try and build the plugin but found its missing
ServerSideExtension.cs
ServerSideExtensionGrpc.cs

from the project ServerSideExtension

What I suspect happened is someone added the files to their project and didn't add them to Git so when the push happened the updated solution file was pushed without the files.

Steps to Reproduce

  1. Clone repo https://github.com/qlik-oss/sse-r-plugin.git
  2. Open solution in C sharp directory using Visual Studio

capture

Multithread in SSEtoRServ

Description

How to run multithread requests

Steps to Reproduce

example enviroment:
RnD Qlik sense server with SSEtoRServ.exe connected to RServe on Docker.
Developer Qlik sense server connected to WinSRV machine with SSEtoRServ.exe connected to RServe on Docker
Demo Qlik sense server connected to WinSRV machine with SSEtoRServ.exe connected to RServe on Docker
See scheme in attached image.
image

Expected behavior

Running requests to R from all QS servers in same time in parallel threads

Actual behavior

Demo QS and Developer QS server connected to R using the same SSEtoRServe plugin runing on WinSRV machine.
Requests for calculations are queued and executed in one thread. No mater all requests from Demo server or half from Demo, half from Dev Server - in same time run only one calculation. At the same time during calculations from those servers, the RnD QS server using own copy of the SSEtoRServ plugin can perform calculations using the same RServe without any delay.
How to run parallel calculations within one SSEtoRServe plugin?

Environment

Operating system where the SSE plugin is deployed
[Х] Windows
[ ] Linux (How do this???)
Qlik Sense
[ ] Desktop
[Х ] Server

Versions

  • sse-r-plugin: 1.2.1.0
  • Qlik Sense: April 2019
  • Operating system: Windows 2016 STD
  • [Other relevant versions] R 3.5

Nothing happen in the application

Description

Functions are still not available in the Qlik Sense Desktop application

Expected behavior

Be able to use the plugin new functions to communicate with R

Actual behavior

Functions are not available, like nothing was done

Environment

Operating system where the SSE plugin is deployed

[ ] Windows

Qlik Sense

[ ] Desktop

All the steps have been followed with success. Am I missed something ? I have made the test on both Qlik Sense and QlikView desktop applications and on both sides, functions are not recognized.

Thanks in advance for your help.

Stéphane

Not working with QlikView 12.

Description

I followed the instructions and worked fine for Qlik Sense. But not for QlikView 12.
Reading the blogs, it says that only works for QlikView 11 and below.
Do you have an estimated date when will it work for QV12?

Steps to Reproduce

  1. [Step one]
  2. [Step two]
  3. ...
Expected behavior

[What you expected to happen]

Actual behavior

[What actually happened]

Environment

Operating system where the SSE plugin is deployed
[ ] Windows 10
[ ] Linux
Qlik Sense
[ ] Desktop 12.5.2 works fine
[ ] Server
QlikView

Version: 12.0.20000.0 64-bit

Versions

  • sse-r-plugin:
  • Qlik Sense:
  • Operating system:
  • [Other relevant versions]

Qlik failing to connect to sse plugin

Description

Qlik sense server is failing to connect to the SSE server on the same machine.

Steps to Reproduce

  1. Start RServe running on 6311 in RGUI on x machine
  2. Run SSE-R plugin extension with default settings pointing to Rserve on x machine
  3. Add analytic connection on x machine (running Qlik Server that points to SSE server using local connection and port 50051)
  4. Restart Qlik engine
Expected behavior

[What you expected to happen]
I expected the Qlik server to successfully connect to the SSE-R server.

Actual behavior

[What actually happened]

Qlik fails to connect to the SSE server and produces an error within the trace log folder. The file is SSE_ENGINE and produces an error code 14 when trying to establish to the SSE server.

'New SSEPlugin added (secure connection). Name: R, address: 127.0.0.1:50051 0'
then produces a warning:
'Failed for 127.0.0.1:50051 error code : 14 0 Internal Engine'
then produces another warning:
'Failed to initialize gRPC communication for SSEPlugin R 0 Internal'

Environment

Operating system where the SSE plugin is deployed
[ ] Windows Server 2016 Datacenter 64-bit(10.0, Build 14393)
##### Qlik Sense Feburuary 2018 Patch 1 - 12.5.3

[ ] Server

### Versions

* sse-r-plugin:
* Qlik Sense: 1.2.1-qlik-oss


### Note
I have all the ports opened for 50051, 6311 and all the ports that the Qlik server uses within the firewall. Yet the Qlik server is still failing to establish a connection to the SSE server.

Qlik Sense does not see plugin

Description

I tried to use R in Qlik Sense, but for some reasons it doesn't work.
Tried different versions of R (including 3.4.4) and SSEtoRserve (1.0, 1.2, 1.2.1).
I use Windows 10 and Qlik Sense 2018 February Patch 1.
Repairing Qlik Sense hasn't helped. Tried changing ports.

Settings.ini:
default

Rserve:
default

SSEtoRserve:
default

And Qlik Sensen recognizes any functions neither in script nor in interface.
default
default

Steps to Reproduce

Started Reserve
Started SSEToRserve
Open Qlik Sense Desktop
Opened Demo app

Environment

Operating system where the SSE plugin is deployed
Windows 10
Qlik Sense
[ ] Desktop

Versions

  • sse-r-plugin: 1.0,1.2,1.2.1
  • Qlik Sense: Feb 2018 Patch 1

Unable to import R extensions

Description

I get an error message in Qlik Sense Enterprise version September 2018 that "the zip file doesn't contain any valid extensions".

Steps to Reproduce

  1. Download sse-r-plugin-1.2.1-qlik-oss.zip
  2. Open the extension section in the QMC
  3. Import extension sse-r-plugin-1.2.1-qlik-oss.zip
Expected behavior

Extension should be imported succesfully and added to the list of extensions.

Actual behavior

Error message apears: "the zip file doesn't contain any valid extensions".

Environment

Operating system where the SSE plugin is deployed
[x ] Windows
[ ] Linux
Qlik Sense
[ ] Desktop
[x ] Server

Versions

  • sse-r-plugin:1.2.1
  • Qlik Sense: September 2018 patch 1
  • Operating system: Windows server 2016
    unable to import r extensions

Guidance on installing the SSE-R plugin on a multi-node environment.

Description

I would like to seek guidance on how to install the SSE-R plugin on a multimode enterprise environment. Ideally we want to balance the load so that each node connects to its own plug-in installed locally on the node. Can you tell me if this can be done and provide documentation on how accomplish this?

Steps to Reproduce

  1. [Step one]
  2. [Step two]
  3. ...
Expected behavior

[What you expected to happen]

Actual behavior

[What actually happened]

Environment

Operating system where the SSE plugin is deployed
[ ] Windows
[ ] Linux
Qlik Sense
[ ] Desktop
[ ] Server

Versions

  • sse-r-plugin:
  • Qlik Sense:
  • Operating system:
  • [Other relevant versions]

ServerSideExtension.dll' could not be found

Description

I have this error when I try to build the program:
ServerSideExtension.dll' could not be found

Can you please advise ?

Thank you
[Description of the issue]

Steps to Reproduce

  1. [Step one]
  2. [Step two]
  3. ...
Expected behavior

[What you expected to happen]

Actual behavior

[What actually happened]

Environment

Operating system where the SSE plugin is deployed
[ ] Windows
[ ] Linux
Qlik Sense
[ ] Desktop
[ ] Server

Versions

  • sse-r-plugin:
  • Qlik Sense:
  • Operating system:
  • [Other relevant versions]

How to add script to qlik sense

Hello!
Please help!
How to add this script to qlik line chart:
library(prophet)
df<-read.csv2("pass.csv", as.is = TRUE)
m <- prophet(df, yearly.seasonality=T, seasonality.mode="multiplicative")
future <- make_future_dataframe(m, periods = 30)
forecast <- predict(m, future)
plot(m, forecast)
prophet_plot_components(m, forecast)

'R.ScriptEvalStr' is not a registered SSE function. Ensure the plugin is running and try restarting Qlik Engine.

Description

I am getting below error while running R_BasicExample app.

'R.ScriptEvalStr' is not a registered SSE function. Ensure the plugin is running and try restarting Qlik Engine.

SSEtoRserve plugin is running fine with the message SSEtoRserve.Program|gRPC listening on port 50051.

Environment

Operating system where the SSE plugin is deployed
[ ] Windows-Microsoft Windows Server 2019 Standard
Qlik Sense
[ ] QlikSense Server May 2022 Patch 4

Please let me know if you need any further information.

Forecast isuue

Hi,

forecast()$mean is returning value which is not correct and same for all predicted years. Whereas the same code in R result in another number. Please help.

Regards
Miskin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.