Skip to Content

SAP HCP predictive services, Expose your predictive demo dataset as an OData service

Previous

SAP HCP predictive services, Expose your predictive demo dataset as an OData service

By Abdel Dadouche

Expose the demo data to be used with the SAP HCP predictive services as an OData services

You will learn

  • How to use the create an OData service to expose a table stored in the HANA HCP instance

Details


  1. Open the SAP HANA Web-based Development Workbench on your trial HANA instance connected HANA User Account, click on Editor.

    SAP HANA Web-based Development Workbench

  2. Right click on public, then navigate the menu New > Package.

    SAP HANA Web-based Development Workbench

  3. Complete the form following properties:

    • Package Name: timeseries

    Click on Create

    New Package

  4. Right click on timeseries, then click on Create Application.

    SAP HANA Web-based Development Workbench

  5. Complete the form following properties:

    • Package: public.timeseries.odata

    Click on Create

    New Application

  6. Right click on odata, then navigate the menu New > File.

    SAP HANA Web-based Development Workbench

  7. Complete the form following properties:

    • File Name: timeseries.xsodata

    Click on Create

    New Package

  8. Enter the following code in the file:

    service {
      "DEMO"."TIME_SERIES" as "TimeSeriesData";
    }
    settings {
      support null;
    }
    

    This is the OData Service declaration for the TIMESERIES table located in the DEMO schema which we will now reference as TimeSeriesData

    Click on the save button in the top menu bar

    XS OData

  9. You can now test your service by clicking on the run button in the top menu bar.

    This will list all the services defined in your xsodata file.

    OData Service List

    Later, you will be using this OData service, so you should save the highlighted URL in a notepad as your OData Service URL.

Next Steps

Updated 09/27/2016

Time to Complete

5 minutes

Beginner

Tags

Next
Back to top