You are not logged in.

Unanswered posts



Important! This site has been replaced. All content here is read-only. Please visit our brand-new community at https://community.talend.com/. We look forward to hearing from you there!



#1 2017-02-21 20:48:41

pkumar17
Member
11 posts

pkumar17 said:

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

Last edited by pkumar17 (2017-02-21 20:49:25)

Offline

#2 2017-02-21 22:30:52

vapukov
Member
470 posts

vapukov said:

Re: Talend and R Integration

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)

Last edited by vapukov (2017-02-21 22:32:59)

Offline

#3 2017-02-21 22:37:09

pkumar17
Member
11 posts

pkumar17 said:

Re: Talend and R Integration

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

Offline

#4 2017-02-22 16:33:03

pkumar17
Member
11 posts

pkumar17 said:

Re: Talend and R Integration

Hi All,
Any help on this topic is apprecaited.

Offline

#5 2017-02-23 10:00:38

vapukov
Member
470 posts

vapukov said:

Re: Talend and R Integration

tFileOutputDelimited could not be connected with tExecuteRScript
use OnSubJobOk (or OnComponentOk) instead

Last edited by vapukov (2017-02-23 10:01:07)

Offline

#6 2017-02-23 15:07:00

pkumar17
Member
11 posts

pkumar17 said:

Re: Talend and R Integration

Yes I did that and it was getting connected. Thanks for the suggestion.

Offline

#7 2017-02-24 16:37:37

pkumar17
Member
11 posts

pkumar17 said:

Re: Talend and R Integration

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)
[FATAL]: test__java.rmodel_0_1.RModel - tExecuteRScript_2 null

Offline

#8 2017-02-24 20:36:08

pkumar17
Member
11 posts

pkumar17 said:

Re: Talend and R Integration

Any help on the same is appreciated.

Offline

#9 2017-02-24 22:22:58

pkumar17
Member
11 posts

pkumar17 said:

Re: Talend and R Integration

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)
[FATAL]: test__java.rmodel_0_1.RModel - tExecuteRScript_2 null

Any help on the above error is appreciated

Offline

#10 2017-02-27 20:14:00

pkumar17
Member
11 posts

pkumar17 said:

Re: Talend and R Integration

Any help on the above will be appreciated.

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy