Introducing SAP HANA Cloud Platform predictive services
Hi,
Did you already hear about the recent release of SAP HANA Cloud Platform predictive services?
Are you familiar with this new way to access powerful predictive functionality that runs in-memory in HANA yet is easily accessible via RESTful web services? No SQL necessary!
If not, check out the excellent blog by Ashish Morzaria as well as the awesome starter kit by Thierry Brunet.
Here at the SAP HANA Academy we’ve put together a series of hands-on video tutorials that show the basics of predictive services from both an admin and developer perspective.
The first video tutorial covers getting started topics such as where to find the documentation.
Tutorials 2,3 & 4 cover the one time setup process for new HCP landscapes – admin tasks.
If you just want to get a feel for how to develop with predictive services you can jump straight into tutorial #5 “First Steps”.
Tutorials 6-11 cover the individual services in more depth – dataset, key influencer, scoring equation, forecast, outliers and what-if?
UPDATE 17th March 2016: Tutorials 12-18 cover how to create a HTML5 app using SAP Web IDE that incorporates predictive services.
Each tutorial includes an example and you can follow along yourself as all data and code snippets have been posted to our GitHub repository.
1. Getting Started
2. Setup – Deploy & Install APL
3. Setup – Create Technical User
4. Setup – Binding, Roles, Start
5. First Steps
6. Dataset Service
7. Key Influencer Service
8. Scoring Equation Service
9. Forecast Service
10. Outliers Service
11. What If Service
12. HTML5 – HCP Destination
13. HTML5 – Create Project
14. HTML5 – Register a Dataset
15. HTML5 – Controls for DatasetID and Target Variable
16. HTML5 – DatasetID onChange
17. HTML5 – Key Influencers
18. HTML5 – Deploy to HCP
For the YouTube playlist follow this link: http://bit.ly/SHAHCPps
We hope these help you get up to speed with predictive services.
Have fun!
Philip
Thanks Philip for the awesome insights on how to use SAP Predictive Services.
I get an error while i tried to run the HTML5 App to register dataset (I am using Chrome)
While registering a dataset via HTML5 App, i.e. when we Register Sales/Claims Fraud dataset, i get a "{"readyState":4,"responseText":"<html><head><title>Error report</title></head><body><h1>HTTP Status 401 - Unauthorized</h1></body></html>","status":401,"statusText":"Unauthorized"}" error.
The C4PA User and Admin Access have been provided to my Cloud user. The destination has also been setup as 'ps' (connecting HANA MDC to PS). The neo-json app also has been modified to add the new route (i.e. ps).
Do you have any idea as to why i might be getting this authorization error?
Thanks,
Santanu
Hi Santanu,
Thanks for the nice feedback!
I assume you're using the HCP developer trial? HCPps on the free trial landscape was made available only very recently and has a few differences to the starter edition landscape that I used in the the video series.
Can I suggest you check out this blog (if you have not already done so): How to deploy SAP HANA Cloud Platform, predictive services on your HCP Trial account?
From what you describe I might suggest double-checking the binding has been configured with the correct user and the HCPps java app restarted so that the binding changes can take effect? Also double-check the HCP destination has been configured correctly and fully restart WebIDE (refresh in Chrome) to ensure the latest destination settings are active.
Thanks,
Philip
Hi Philip,
Yes, i do have a HCP Trial Account. I checked the blog referred by you and did the exact same thing. In essence -
1) Destination is correctly setup (Success: connection to "ps" successful)
2) Binding has been done using PS_USER
3) The HCP User has been given the roles - AA-Admin, C4PA-User & C4PA-Admin
4) The java app service has been restarted and WebIDE has also been fully restarted (Chrome browser)
I also tried to debug using Chrome developer tools. The response headers are as -
Also i get a warning message stating -
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
I was wondering whether CORS is working fine. Do you reckon anything to do with browser related settings?
Thanks,
Santanu.
🙂 Thanks Philip
Hi Philip,
What is the recommended authentication configuration setting for the application. I was trying to practice steps mention in video number 5. But I am getting following HTML error
<noscript>
<p>Note: Your browser does not support JavaScript or it is turned off. Press the button to proceed.</p>
</noscript>
Status is still 200 ok.
Best,
Aamir
Hi Aamir,
It's not an HTML error, rather you are receiving the HCP login page in HTML.
I suggest to try basic authentication.
Thanks,
Philip
Hi Philip,
I tried using basic authentication but still no luck.
Do I need to make some changes in HANA cockpit?
Best,
Aamir
Hi Aamir,
It seems only SAML authentication is supported in the HCP free developer trial (and not basic auth) and SAML authentication is difficult to configure in Postman. For GET requests you should be able to login to HCP trial in your web browser first - then GET calls to the API passed as URL's in Chrome should work. However for PUT, POST, DELETE right now the best option I can suggest is to use the ability to send requests from the Documentation API UI that is provided by HCPps
Thanks,
Philip
Hi Philip,
Does that mean we are supposed to set 'No Authentication' for the configured destination? If i set that, i don't get the unauthorized '401' error. But i however get the same HCP logon page as HTML with Status = 200 OK. When you say that HCP Trial account allows only SAML, i guess 'No Authentication' translates to SAML request. I get the following message --
<p>Note: Your browser does not support JavaScript or it is turned off. Press the button to proceed.</p></noscript><form method=\"post\" action=\"https://accounts.sap.com/saml2/idp/sso/accounts.sap.com\"><input type=\"hidden\" name=\"SAMLRequest\"
even though the status is 200 OK.
Do we need to set anything under 'Trust' >> 'Local Service Provider'?/
Thanks,
Santanu
Hi Santanu,
With the HCP developer trial I have been using "App2AppSSO" Authentication in the HCP destination. This way, for your HTML5 app, if you have already logged into HCP cockpit from the same browser session the same authentication will also then work for the destination. This should be enough for demo and evaluation purposes. The starter edition of HCP (as against the free developer trial edtion) allows you to configure basic authentication - as shown in the videos.
Hope that helps,
Philip
Hi Phil,
thanks for your reply.
Sorry for posting late. After restarting the application, it started working for me.
Best,
Aamir.
Hi Philip,
First of all Thanks for your videos regarding predictive service.I learn lot from this videos.I have a very simple question regarding in this topic “Setup – Create Technical User” and “4. Setup – Binding, Roles, Start”.the question is like
when you are creating a technical user “PS_User” and associate this user with SAP Hana instance in the eclipse in 3rd video then why you are doing the same job in databinding part in the 4th video?
I also attached two video clips for your better understanding.
thanks in advance for your update.
Regards,
Mriganka
Hi Philip,
is App2AppSSO is secure enough for production environment?
Thank you in advance,
Yan
Hi Phillipe
We created a predictive app for fashion. We want to use the Forecast API to create a forecast for a new style or garment. Lets say I upload a new style with no history in the database. But the style has sales attributes I can compare with past data such us gender, type or color. My questions are:
Can you help us on this?
Thanks
Hi Lucas,
Thanks for watching the videos and reaching out.
Forecast API is designed to analyze a single attribute over time and when you want the forecast to consider trending and seasonality. As such you can only have a single record in the input dataset for each timestamp (in your case date). So you should aggregate the data before calling the forecast API or call the forecast API multiple times whichever you prefer.
For more in-depth discussion I highly recommend posting a question in the Predictive Analytics area of the SAP Community: https://www.sap.com/community/topic/predictive-analytics.html
Thanks,
Philip