Skip to Content

How to connect SAP HANA to R studio (SLES OS virtual machine ) on SAP Cloud Platform trial account?

Aug 10, 2017 at 10:57 PM


avatar image

Hello experts,

I'm facing an issue in integrating SAP HANA with R Studio (RServe listening on a port of a

virtual machine OS-SUSE Linux Enterprise Server 11.3).

The scenario is as follows:(I am using a trial account on SAP Cloud platform)

Have created a HANA tenant database in the cloud.Created a custom user with all the required privileges for my needs-(refering to 1.SAP HANA Development Guide-Section on custom developer role 2.SAP HANA and R integration guide)

An XS Classic application has been also created where everything is working properly(Basic flow of data from SAPUI5 frontend being persisted in SAP HANA database via XSJS calls)

My issue comes in terms of calling an SQL script procedure(with language R ) where

I get the following error when executing it:

2048 - column store error: search table error: [2620] executor: plan operation failed

I get the same error when calling the procedure from SAP HANA studio,as well as executing an XSJS script (calling that procedure) in SAP Web based Development Workbench.

My primary concern was if I had missed setting up some authorization privilege,but using the built in editor for authorization graph,I see all the required privileges are there for the procedure,and all of its subobjects.

Part of my stack trace which raises me an issue:

pop.addPlanDebugOpDataInfo('custom_schema:_SYS_SS_CE_175213_vers2_lang9_type1_140344147501056:2_TMP', callerName='$D_OUTPUT$', sqlScriptFunctionName='custom_schema:sna::simple_prime_procedure') [6752]{200068}[17/-1] 2017-08-10 21:51:34.605887 e cePlanExec cePlanExecutor.cpp(08167) : Error during Plan execution of model custom_schema:_SYS_SS_CE_175213_vers2_lang9_type1_140344147501056:2_INS (t -1), reason: executor: plan operation failed [6169]{200087}[24/208548] 2017-08-10 21:52:32.344295 i TraceContext TraceContext.cpp(00960) : UserName="some_user", ApplicationUserName="some_application_user", ApplicationName=HDBStudio, ApplicationSource=csns.sql.editor.SQLExecuteFormEditor$2$;, StatementHash=c5de86a204088713b2fd207d67065475 [6169]{200087}[24/208548] 2017-08-10 21:52:32.344289 e ceExecute cePopBase.cpp(01232) : Caught ltt::exception: Error: feature '$feature [6744]{200087}[24/-1] 2017-08-10 21:52:32.344447 e Executor PlanExecutor.cpp(00872) : plan failed with rc 2620; executor: plan operation failed [6744]{200087}[24/-1] 2017-08-10 21:52:32.344473 e Executor PlanExecutor.cpp(00872) : -- returns for [6744]{200087}[24/-1] 2017-08-10 21:52:32.344480 e Executor PlanExecutor.cpp(00872) : executor: plan operation failed(2620), plan: 6 pops: ceSqlPop pop1(out a), ceConvertDatatypePop pop2(in a, out b), ceRPop pop3(in b, out c), ceConvertDatatypePop pop4(in c, out d), ceCustomCppPop pop5(in d, out e), ceProjectionPop pop6(in e, out f) [6744]{200087}[24/-1] 2017-08-10 21:52:32.344496 e Executor PlanExecutor.cpp(00872) : pop3, 21:52:32.344 +0.000, cpu 140346813278688, ceRPop, rc 2620, executor: plan operation failed [6744]{200087}[24/-1] 2017-08-10 21:52:32.344511 e Executor PlanExecutor.cpp(00872) : Total: 21:52:32.339 to 21:52:32.344 +0.005 [6744]{200087}[24/-1] 2017-08-10 21:52:32.344518 e Executor PlanExecutor.cpp(00872) : sizes a 164 b 164 c 0 f 0 [6744]{200087}[24/-1]

Here is the part I suspect to be a problem:

2017-08-10 21:52:32.344522 e Executor PlanExecutor.cpp(00872) : -- end executor returns [6744]{200087}[24/-1] 2017-08-10 21:52:32.344525 e Executor PlanExecutor.cpp(00872) : pop3 (rc 2620, executor: plan operation failed) is disabled. (See M_CUSTOMIZABLE_FUNCTIONALITIES) {replace4} {replace5} {replace6} {replace7} {replace8} {replace9} {replace10} {replace11}

After querying the M_CUSTOMIZABLE_FUNCTIONALITIES i see that RIntegration parameter is set to false on a system level.(Other standard parameters as cer_address,..

from the SAP HANA and R integration manual are set as xsengine.ini>calcEngine parameters).

Neither from SAP HANA Studio or SAP HANA Cockpit I can't change the global.ini>customizable_functionalities>rintegration parameter to true.(system level)

As stated in SAP HANA Administration guide changes local to a tenant database can be configured in indexserver.ini,so I managed to add the rintegration parameter(set it to true).

Also did a restart of the db.

However I'm still getting the

2048 - column store error: search table error: [2620] executor: plan operation failed

error,both from SAP HANA Studio and Web_Based_W

So my primary questions are:

1.Have I foreseen something that could raise the error?

2.Is there another ini file where the changes should be made for a tenant db?

3.Is it possible to change systemdb setting(i.e customizable_functionalities in global.ini) from a trial account.(In HANA Studio i can add Cloud System>But i have to choose a db/schema and can't select system db,and then from tenant db I am not allowed to change system settings)

This third solution would be the most favourable one.

Kindly ask you to give me feedback and help me out.



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Lars Breddemann
Aug 11, 2017 at 03:04 AM

That's a very "busy" question. Let's break it down a bit.

1. Can you use the server-side (!) SAP HANA - R integration with the SAP Cloud trial account HANA tenant DBs?

Nope, that's not possible.

2. Can you use the HANA - R integration to make your HANA model include your local desktop R?

Nope, not possible either. The HANA - R integration works via a network connection between the HANA server and a computer that runs the RSERVER component (as documented).

3. Has all this anything to do with the SAP HANA Studio?


4. How could you still use R with the trial account HANA tenant?

You could use ODBC or JDBC combined with the neo-cloud-tunnel to connect your local R script to your HANA instance and access the data you want to work with. There's been blogs and examples for how to do that around...

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Dear Lars,

Thanks for the information.Your input is appreciated.Not sure about point 2, so let me clarify.

My data is stored in columnar tables in SAP HANA.What I am trying to do is to pass one <table_example> as IN parameter into SQL script procedure(the coresponding type of IN is table_type),for the system to convert it to data frame,and process it on on-premise system where my R environment is located.Then after doing some basic calculations data frame should be again converted to table on the cloud side.I was following the documentation for SAP HANA and R integration, apart from that I would like to run R on my local machine.

As far as connectivity i have the exposed public IP address and port (of my router)

(set as parameters in .ini files- to where I would like the SAP HANA Cloud system to communicate to)

being forwarded(port forwarding) to specific IP address of my VirtualBox machine and specific port where RSERVE is listening (Virtual Box adapter is set in a mode where the Virtual OS machine is recognized as a physical machine on my local network).

So not to make another busy post :) is this achivable (I am aware of ODBC&JDBC possibilities,but would prefer this approach) on SAP Cloud Trial,and if not kindly ask you to explain me what is wrong in this approach,and potentially raises the error.

Thanks in advance.

Kind regards,