Skip to Content
avatar image
Former Member

HANA PAL Procedures not existing

I want to use the HANA Predictive Analysis Library in our SAP Cloud Platform and tried to check the installation following the official help site.

The following statements do return the expected result:

SELECT * FROM "SYS"."AFL_AREAS" WHERE AREA_NAME = 'AFLPAL';
SELECT * FROM "SYS"."AFL_PACKAGES" WHERE AREA_NAME = 'AFLPAL';
SELECT * FROM "SYS"."AFL_FUNCTIONS" WHERE AREA_NAME = 'AFLPAL';

However, in the catalog the APL procedures don't show up in the _SYS_AFL schema (even though the Functions exist):

My user is assigned to the roles AFL__SYS_AFL_AFLPAL_EXECUTE and AFL__SYS_AFL_AFLPAL_EXECUTE_WITH_GRANT_OPTION.

When trying to call a PAL procedure (using the example code from the official help site), I get the error:

Could not execute 'CALL _SYS_AFL.PAL_KMEANS(PAL_4_COLUMN_DATA_TBL, "#PAL_PARAMETER_TBL", ?, ?, ?, ?, ?)' in 25 ms 398 µs . SAP DBTech JDBC: [328]: invalid name of function or procedure: PAL_KMEANS: line 1 col 15 (at pos 14)

Can someone help me out with this?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 07 at 08:23 AM

    Hi Former Member

    If you are running SAP HANA prior to version 2.0 SPS01 (I think), then the KMEANS procedure won't be present.

    If you are using SAP HANA on the SAP Cloud Platform, then you will most likely use version 1.0 SPS12 on the Neo environment .

    To get the version you can run the following SQL:

    select version from M_DATABASE;

    Now, if you want to check if the KMEANS function is there you can run the following SQL:

    SELECT * FROM "SYS"."PROCEDURES" WHERE PROCEDURE_NAME LIKE '%KMEANS%'; 

    But on HANA 1.0 SPS12, it won't be present, and you will need to use the "old fashion" way, where these wrapper procedure needs to be created manually as detailed here: https://help.sap.com/viewer/2cfbc5cf2bc14f028cfbe2a2bba60a50/1.0.12/en-US/53e6908794ce4bcaa440f5c4348f3d14.html

    Hope this helps.

    @bdel

    Add comment
    10|10000 characters needed characters exceeded