Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Talend and R Integration

Hi All,
We have a requirement for running an R Model to produce some results for us. The flow we would like to go with is:
SnowFlakes(Data Warehouse) -- > tExecuteRScript ----> SQL Server
I want to pull data from snowflakes which is in the cloud and then pass the data through the R script and store the output to SQL server. I have installed the tExecuteRscript but for some reason I am not able to establish a connection between SnowFlakes and R. Any help will be appreciated. 
Thanks

Labels (3)
10 Replies
vapukov
Master II
Master II

https://gabrielebaldassarre.com/talend/texecuterscript/
Please note that this is a starting/generating component, not a processing component. This means that incoming data connections are not allowed here.
To use it, just write down in the box the code you want to be executed by R. Please note this must be correctly quoted and escaped. Alternatively, you can source a code from an external .R file.

You can read this site, in this case Your flow must be
SnowFlake -> local storage (csv ?) -> R-Script which load and calculate result -> Store Result somewhere -> load result to SQL Server

or You can test SQL Server 2016 with R-Service installed
in last case Your flow will be 
SnowFlake -> SQL Server table -> tMSSQLrow (call r-script from T-SQL)
Anonymous
Not applicable
Author

Thanks for your response. I tried that as well, but the tFileOutputDelimited component does not establish a connection with tExecuteRScript. 
The flow was like
Snowflakes-->tFileOutputDelimited--->tExecuteRScript--->Sql Server
Anonymous
Not applicable
Author

Hi All,
Any help on this topic is apprecaited.
vapukov
Master II
Master II

tFileOutputDelimited could not be connected with tExecuteRScript
use OnSubJobOk (or OnComponentOk) instead
Anonymous
Not applicable
Author

Yes I did that and it was getting connected. Thanks for the suggestion.
Anonymous
Not applicable
Author

Hi Vapukov,
I am getting the below error. Could you please let me know if this is something you have faced earlier. Sorry I am new to Talend:
As no loop expression was given, the biggest column of data will actually limit the number of iterations
Exception in component tExecuteRScript_2
java.lang.NullPointerException
at org.gabrielebaldassarre.customcode.jri.tJRISymbol.evaluate(tJRISymbol.java:29)
at org.gabrielebaldassarre.customcode.jri.tJRISilentClientImpl.evaluateSymbol(tJRISilentClientImpl.java:31)
at org.gabrielebaldassarre.customcode.jri.tJRIFlowBehaviour.visit(tJRIFlowBehaviour.java:55)
at test__java.rmodel_0_1.RModel.tExecuteRScript_2Process(RModel.java:1873)
at test__java.rmodel_0_1.RModel.tSnowflakeInput_1Process(RModel.java:1069)
at test__java.rmodel_0_1.RModel.runJobInTOS(RModel.java:2395)
at test__java.rmodel_0_1.RModel.main(RModel.java:2229)
: test__java.rmodel_0_1.RModel - tExecuteRScript_2 null
Anonymous
Not applicable
Author

Any help on the same is appreciated.
Anonymous
Not applicable
Author

Hi All,
Below is the error that we get although we installed all the required packages:
Error in library(dplyr) : there is no package called 'dplyr'
As no loop expression was given, the biggest column of data will actually limit the number of iterations
Evaluating expression: 'is.integer(x)'
Error: object 'x' not found
Exception in component tExecuteRScript_2
java.lang.NullPointerException
at org.gabrielebaldassarre.customcode.jri.tJRISymbol.evaluate(tJRISymbol.java:29)
at org.gabrielebaldassarre.customcode.jri.tJRIStandardClientImpl.evaluateSymbol(tJRIStandardClientImpl.java:82)
at org.gabrielebaldassarre.customcode.jri.tJRIFlowBehaviour.visit(tJRIFlowBehaviour.java:55)
at test__java.rmodel_0_1.RModel.tExecuteRScript_2Process(RModel.java:1882)
at test__java.rmodel_0_1.RModel.tSnowflakeInput_1Process(RModel.java:1078)
at test__java.rmodel_0_1.RModel.runJobInTOS(RModel.java:2404)
at test__java.rmodel_0_1.RModel.main(RModel.java:2238)
: test__java.rmodel_0_1.RModel - tExecuteRScript_2 null
Any help on the above error is appreciated
Anonymous
Not applicable
Author

Any help on the above will be appreciated.