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

To report this post you need to login first.

11 Comments

You must be Logged on to comment or reply to a post.

  1. Santanu Ghosh

    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

    (0) 
    1. Philip MUGGLESTONE Post author

      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

      (0) 
      1. Santanu Ghosh

        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 –

        Response_404.jpg

        Response_Header.JPG

        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.

        (0) 
  2. Aamir Fakir Mohamed Lakdawala

    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


    (0) 
        1. Philip MUGGLESTONE Post author

          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

          (0) 
          1. Santanu Ghosh

            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

            (0) 
            1. Philip MUGGLESTONE Post author

              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

              (0) 

Leave a Reply