cancel
Showing results for 
Search instead for 
Did you mean: 

Does SAP Data Warehouse Cloud currently support PAL functions?

thomasyuan
Explorer
0 Kudos

With data models and calc views all set up, I am exploring potential predictive functionalities of SDWC with two options:

- Predictive functions through hana.ml & hana.ml.r packages

- SQL Script based PAL functions calls through JDBC connection

In both scenarios I was prompted privilege error. However, all of following SQL suggests SWDC tenant has AFL/PAL properly configured.

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';

I am wondering whether PAL functions are currently (July 2020) supported in SWDC or it is merely my misconfiguration?

Thanks.

dvankempen
Product and Topic Expert
Product and Topic Expert
0 Kudos

You asked a question. Don't forget to mark the answer that helped you most as correct. Thanks!

For the readers, before you leave, don't forget to up/down vote the answers. You can vote on the question too.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

dvankempen
Product and Topic Expert
Product and Topic Expert

Hi Thomas,

You can look this up in the SAP HANA Cloud documentation:

SAP HANA Predictive Analysis Library (PAL). This feature is planned but not initially available.

To be informed about future plans, you can check the road map. It is currently set for Q3 but keep in mind that plans can always change:

thomasyuan
Explorer

Thanks for the links Denys. They are spot on. And I trust PAL will be a feature that is highly sought after.

Answers (7)

Answers (7)

AxSAP
Product and Topic Expert
Product and Topic Expert

Hi Thomas,

DWC wave 2021.01 will provide the capability to enable the HANA Cloud script server on the DWC-Space level.

Once activated, you can connect using the DB-User to the openSQL-Schema and run HANA SQL commands / or external tooling (e.g. python) to leverage the HANA Cloud PAL/APL library functions. WebIDE and the accroding project setup is the other option to leverage the HANA Cloud PAL/APL library functions.

Thanks,

-Axel

thomasyuan
Explorer
0 Kudos

That's great news! Really looking forward to it.

Thanks.

XaviPolo
Active Contributor
0 Kudos

I'm looking forward to this update. It will be very interesting to add PAL/APL to DWC projects.

YatseaLi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi All,

As of Sep 22 2021, I can't find any activation option in space level of my DWC (version 2021.19.67) with Database Release 4.00.000.00.1629881058 (2021.18.11)

However, found out the help portal about this topic below. Basically, you need to create an SAP ticket to request scriptserver enablement in your DWC tenant.

Using the Machine Learning Libraries (APL and PAL) in DWC https://help.sap.com/viewer/9f804b8efa8043539289f42f372c4862/cloud/en-US/287194276a7d4d778ec98fdde5f....
=>
"For a step-by-step guide to create an SAP ticket and enable the machine
learning libraries take a look at this SAP Knowledge Base Article:2994416 - Enablement of APL and PAL in DWC"

Kind Regards, Yatsea

AxSAP
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Yatsea,

yes - you need to request the script server to be enabled on your DWC tenant via SAP-ticket.

Once activated, you need to activate the checkbox in your SPACE to let DWC grant the according privileges to the according DB-User. You need to re-create an additional DB-User in your Space after the Script-server and checkbox has been activated to have the acording privileges granted.

Sorry for the confusion.

henrique_pinto
Active Contributor

Hi all, notice that having the PAL/APL capabilities (related to the scriptserver) made available in HANA Cloud is not enough for them to be available in DWC. DWC is an application/SaaS and not a DBaaS like HANA - meaning that all necessary authorizations and infrastructure-related activities need to be available as APIs and added to the DWC CI/CD pipelines. This is to avoid having humans using the all-powerful DBADMIN user in a customer's DWC tenant - all operations in DWC are automated and/or triggered by a CF api, not on the DB level.

As such, it will take a little longer for the PAL/APL (and other scriptserver enabled libraries) to be available in DWC. The plan is to have it in Q4 (by the end of the year).

thomasyuan
Explorer
0 Kudos

Thank you Henrique for the update. Really looking forward to it.

dvankempen
Product and Topic Expert
Product and Topic Expert

Update: PAL was added in the July update QRC 02/2020

https://help.sap.com/viewer/3c53bc7b58934a9795b6dd8c7e28cf05/cloud/en-US/2e7660d216144e78bb809ce0f9c...

SAP HANA Cloud release, July 2020
  • Ability to import and export data using the IMPORT/EXPORT Statements
  • SAP HANA Predictive Analysis Library (PAL)
  • SAP HANA Automated Predictive Library (APL)
AndreasForster
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi, This question is getting a lot of attention / views.
Hence here is a summary of how APL/PAL has been working for me in DWC

  • Create a ticket to have APL / PAL set up, see https://launchpad.support.sap.com/#/notes/0002994416
    APL / PAL require the script server, which requires 3 virtual CPUs. Since the DWC trial comes only with 2 virtual CPUs APL / PAL cannot be used in the trial
  • In your DWC space create a new Database User with "Enable Automated Predictive Library (APL) and Predictive Analysis Library (PAL)" ticked
  • That user doesn't have direct access to the tenant's tables, hence the following hana_ml Python code gives an "insufficient privilege" error
    conn.table("YOURTABLE", schema = "YOURSCHEMA").count()
  • The user however can access views in the tenant (and create/access tables/views within the user's local space). To access data from a tenant table create an SQL View in DWC (ie SELECT * FROM YOURTABLE) and tick "Expose for Consumption"

You can now access the data by going through that view and apply APL / PAL, ie with hana_ml. This code should succeed now: conn.table("YOURVIEW", schema = "YOURSCHEMA").count()

And a simple example with PAL to split the data

df_remote = conn.table("YOURVIEW", schema = "YOURSCHEMA")

from hana_ml.algorithms.pal import partition

df_remote_train, df_remote_test, df_remote_ignore = partition.train_test_val_split(random_seed = 1972,

data = df_remote,

training_percentage = 0.7,

testing_percentage = 0.3,

validation_percentage = 0)

df_remote_train.count()

mscherbinek
Discoverer
0 Kudos

Thank you for the summary Andreas!

"Since the DWC trial comes only with 2 virtual CPUs APL / PAL cannot be used in the trial"

Do SAP have any plans to overcome this trial limitation of DWC? I see a lot of customer trial versions of DWC which are used for evaluation. And PAL/APL integration with Python/R would be at least something nice to show.

AndreasForster
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi marcel.scherbinek , Great to hear about the demand you are seeing for ML in DWC!

I also wish myself that HANA ML would be in the free DWC trial. However, please contact your Account Executive or Partner Manager if you need a DWC trial with APL/PAL. Maybe something can be setup.

thomasyuan
Explorer
0 Kudos

Apparently the feature has now been available by request. According to Note 2994416, opening an Incident to enable scriptserver on DWC tenant will do the trick. Another big tick!

IngoH
Active Contributor
0 Kudos

Hello Thomas,

SAP DWC is based on SAP HANA Cloud and we also provide an integration via WebIDE (full stack) with the underlying SAP HANA database.

In such a scenario could can then leverage model from DWC as part of scenarios for PAL / ML.

Best Regards

Ingo Hilgefort, SAP

thomasyuan
Explorer
0 Kudos

Thank you Ingo for advising. From the conversion above between your colleagues Denys and Henrique, there seems to be some further complication to be resolved with the current set up in HANA Cloud in order for DWC users to consume PAL.

In addition, both Tim and myself found hana.ml package does not connect to DWC, which I believe is a separate issue of compatibility.

tmths
Explorer
0 Kudos

Hi everyone,

is PAL on DWC working for you?

When accessing PAL via hana_ml and an OpenSQL Schema of DWC, I get the following error mentining insufficient privileges:

thomasyuan
Explorer
0 Kudos

No it doesn't work, hence my original question. I used the R package hana.ml.r, which crashed at the connection step with the same error. I believe currently 1) the JDBC user doesn't have the essential priviledges 2) The version check fails