Hello everyone!
I have a problem with calling R functions in SAP HANA. I'm using the same syntax as in the R integration manual
CREATE PROCEDURE PORT_OPT (IN data STORE_FEATURES_TBL, IN rs RIGHT_HAND_SIDE, IN par PARAMETER, OUT val OBVAL, OUT sol PORT)
LANGUAGE RLANG AS
BEGIN
### R CODE HERE ###
END;
I have also tested some example codes and they worked very well. But as soon as I actually try to do more complicated things in R (leaving the code before and after the "R part" unchanged) it doesn't work anymore. I figured out that especially the usage of for-loops causes HANA to return the following error message
sql syntax error: unterminated external language
And this even if the for-loop is commented out in R syntax (using #). So i guess you are not allowed to use constructions that are already used in SQL language (words like "case" cause the same error).
Now my question is, is there any way to forbid HANA interpreting code that is inside the "R part" as SQLScript? Or am I wrong with this problem analysis?
Can you help me out on this one?
All the best
Michael