Create an OData Producer Service Model

Use the Model option in the OData Server configuration file to create an OData Producer service model.

You can create an OData Producer service model to expose specific tables and views by defining a namespace (the model) in a text file that complies to the OData Service Definition Language (OSDL) syntax. The model is applied to the OData Producer when you reference the text file using the Model option in your OData Server configuration file.

Syntax

service [namespace "namespace-name"] {
    "owner"."{table-name | view-name}" [ keys("column-name", ...) ]
    ...
  }

Parameters

Examples

Usage

  • You can define a service that contains references to multiple tables or views.
  • When using the keys parameter:
    • Specify a key list when referencing a table or view that does not contain a primary key.
    • Do not specify a key list when referencing a table that contains a primary key.
The model is applied to the OData Producer when you reference the text file using the Model option in your OData Server configuration file.