Show TOC

Enabling Database Content as OData ServicesLocate this document in the navigation structure

Enabling database content as OData services using Integration Gateway.

Context

Integration Gateway allows you to expose OData services that are based on database tables by mapping the model definition to the corresponding tables. Use OData Modeler to define an OData model which should match the table properties, then bind the OData model to a JDBC datasource. There should be one-to-one mapping between the OData model and the table properties. OData JDBC processor is used to connect to the database via JDBC connectivity which fetches data at runtime.

For details of the tasks performed using OData Modeler, see the OData Modeler Documentation on https://help.hana.ondemand.comInformation published on SAP site.

Integration Gateway provides Custom Processors, a plug-in mechanism to provide your own logic on top of the output generated by the API toolkit for SAP Mobile Platform to enhance / modify the content. See Defining Custom Code on https://help.hana.ondemand.comInformation published on SAP site. The relevant content is located in Start of the navigation path API toolkit for SAP Mobile Platform Documentation Next navigation step  Binding Data Sources Next navigation step  Defining Custom Code End of the navigation path.

OData Feature Status
Create Supported
Read Supported
Update Supported
Delete Supported
Query Supported
Navigation Supported
Delta token Supported (via custom processor)
Tombstones Supported (via custom processor)
System query options: $orderby, $skip, $top, $select, $expand, $inlinecount, $filter, $format Supported
$count Supported
Custom query options Not supported
$batch Not supported
Function imports Not supported
Deep insert Not supported
$link Not supported
$value Not supported
Complex types Not supported
$filter Details
String functions
  • Supported:
    • bool substringof(string po, string p1)
    • bool startswith(string p0, string p1)
    • bool endswith(string p0, string p1)
  • Supported via custom processor:
    • string substring(string p0, int pos)
    • string substring(string p0, int pos, int length)
    • string tolower(string p0)
    • string toupper(string p0)
    • string trim(string p0)
    • string concat(string p0, string p1)
    • int length(string p0)
    • int indexof(string p0, string p1)
  • Not supported:
    • string replace(string p0, string find, string replace)
Partially supported
Date functions via custom processor Supported
Math functions via custom processor Supported
Logical operators - all the logical operators are supported except for 'Not'. Partially supported
Arithmetic operators Not supported
Type functions Not supported

Procedure

  1. Use API toolkit for SAP Mobile Platform to register the service:

    For details of the tasks performed in this step, see API toolkit for SAP Mobile Platform Documentation on https://help.hana.ondemand.comInformation published on SAP site. The relevant topic to refer to is provided in the corresponding sub steps below.

    1. Create an OData implementation project. See Creating an OData Implementation Project.
    2. Select the JDBC datasource to bind with an entity set. See Selecting a Datasource.
    3. Use the Custom Processor plug-in to define your own logic. See Defining Custom Code.
    4. You can generate integration content or generate and deploy it. See Generating and Deploying Service Implementation Project.
  2. Log in to Gateway Management Cockpit. If you chose:
    1. Generate Integration Content, deploy the content bundle. See Deploying a Custom Service from Gateway Management Cockpit for more information.
    2. Generate and Deploy Integration Content, you should see the registered service in the Registered Services screen.
  3. Assign an existing destination to the service or entity sets. See Assigning and Removing OData Service Destinations. Otherwise, create a new destination, see Creating a Destination on Gateway Management Cockpit and then assign it.