cancel
Showing results for 
Search instead for 
Did you mean: 

Predictive Analytics Authorizations

Former Member
0 Kudos

Hello, We are trying to use predictive Analytics for the first time.

We granted the following authorizations:

Now when we try to run a simple predictive we can see that HANA tryies to run the following statement:

CREATE PROCEDURE "TEST_PREDICT_MODEL_PAS2_3" (IN input1 "APR_MODEL_PAS2_3",IN input2 "APR_TYPE_PAS2_3", OUT result "COMP_APRMODEL_STORE_TYPE_PAS2_3") LANGUAGE RLANG READS SQL DATA AS BEGIN attach(input1);attach(input2);library(arules);model_char1

Could not execute 'CREATE PROCEDURE "TEST_PREDICT_MODEL_PAS2_3"(IN input1 "APR_MODEL_PAS2_3",IN input2 ...'

SAP DBTech JDBC: [258]: insufficient privilege: Not authorized

Which authorizations are missing? What did we miss?

Thanks,

Amir

Accepted Solutions (1)

Accepted Solutions (1)

former_member184912
Participant
0 Kudos

Hi Amir,

Just to check that this is not an PAL configuration problem.

Please do the following PAL  check with following commands:

SELECT * FROM "SYS"."AFL_AREAS" WHERE SCHEMA_NAME = '_SYS_AFL' AND AREA_NAME = 'AFLPAL';

SELECT * FROM "SYS"."AFL_PACKAGES" WHERE SCHEMA_NAME = '_SYS_AFL' AND AREA_NAME = 'AFLPAL';

SELECT * FROM "SYS"."AFL_FUNCTIONS" WHERE SCHEMA_NAME = '_SYS_AFL' AND AREA_NAME = 'AFLPAL';

You can also do the same to test your APL (Automated Predictive Libraries):

select * from "SYS"."AFL_AREAS";

select * from "SYS"."AFL_PACKAGES";

select * from "SYS"."AFL_FUNCTIONS" where AREA_NAME='APL_AREA';

select * from "SYS"."AFL_FUNCTION_PARAMETERS" where AREA_NAME='APL_AREA';

None of the result tables should be empty if PAL & APL is configured correctly.


As for autorizations you can refer to the SAP HANA PAL guide:

For each AFL area, there is a role. You must be assigned this role to execute the functions in the library. The role for the PAL library is automatically created when the Application Function Library (AFL) is installed.

The role name is:

AFL__SYS_AFL_AFLPAL_EXECUTE

To generate or drop PAL procedures, you also need the following role, which is created when SAP HANA is installed:

AFLPM_CREATOR_ERASER_EXECUTE

From the document "SAP HANA Predictive Analysis Library (PAL)" - based on SAP HANA Platform SPS 09, Document Version: 1.1 – 2015-02-16

Try it out and please share your results.

Best regards,

Kurt Holst

Former Member
0 Kudos

Hi,

We get result for everything but the last 2 SQLs:

select * from "SYS"."AFL_FUNCTIONS" where AREA_NAME='APL_AREA';

select * from "SYS"."AFL_FUNCTION_PARAMETERS" where AREA_NAME='APL_AREA';


As you can see from my original message all of the roles from the guide are assigned.

We are using HANA revision 84


Thanks,

Amir

former_member184912
Participant
0 Kudos

Hi Amir,

Thanks for the quick feedback.

Well the missing results on the APL functions is not the problem as this is unrelated to the HANA ABC Analytics (PAL).

I see that you have a RLANG call in your scripts. If you want to use the R language then you also need to provide that priviliges to your user. "Create R Script" as shown below:

May I suggest that you take a look at this article - in the appendix you find an end-to-end scenarios where HANA Script is used with the PAL:

http://scn.sap.com/docs/DOC-50803

Best regards, Kurt

achab
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Amir,

As an information to you, the most probable reason why the the last 2 SQLs are failing is because APL is not installed on your HANA server.


These blog posts might be of interest for you



My 2 cents,


Antoine

achab
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Just as an information, the official documentation for R integration into HANA can be found here: http://help.sap.com/hana/SAP_HANA_R_Integration_Guide_en.pdf

SAP HANA Platform SPS 09 Document Version: 1.1 – 2015-02-16

Security aspects (detailed by Kurt) are on pages 6/7.

Best regards

Antoine

Answers (1)

Answers (1)

achab
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Amir,

Can you please precise what client you are using? Automated Analytics or Expert Analytics? Also are you triggering specific HANA predictive library (APL? PAL?)

Thanks & regards

Antoine

Former Member
0 Kudos

We are using expert analytics using PAL

We get authorization error even for HANA ABC analytics

Thanks,

Amir