on 2019 Nov 15 1:57 PM
We integrated R successfully into Hana, with R Serve on a Linux machine.
But we don't want to put the whole R Script into the SQL script in Hana, we just want to link to an .R File on the R-Server where the R Script is written down.
We tried the normal way in RStudio with source("FILE PATH") and we used the file path on the Linux machine. Does this code even work or does the file path be a different one?
Request clarification before answering.
We could manage it to get run an .R File in the SQL Script.
The code ist quiet easy.
source(file="FILE PATH")
The file path needs to be absolut. It's also possible to call a second .R File from within the first (directly called file).
So in our Testscript we called (in SQL Hana) the R Code and created an Hana Table. The Hana table was filled with data, we read out of an csv file in the .R Script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
lbreddemann Yes, correct. We have RServe on a Linux Machine. The Script was written in RStudio Web Edition, on the RServer.
There is no way to link an .R file in the way you describe. The R code has to be part of the SAP HANA calculation view.
As HANA does not process the code itself, the R integration works by using a channel from the HANA server processes to the RServe process to hand over the R code and the data.
You may try and source other files that are available to the R instance that Rserve creates - similar to the R libraries. This of course requires that the HANA calculation view provides and receives all input/output data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
60 | |
10 | |
8 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.