OData Reader Parameters

The Open Data Protocol (OData) is a web protocol for querying and updating data that builds upon web technologies such as HTTP, Atom Publishing Protocol (AtomPub) and JSON to provide access to remote information.

The OData specification defines the request and response rules for the retrieval of both spatial and non-spatial geographic information using either ATOM or JSON. This reader retrieves data through JSON. While some feeds may be stored as ATOM, it is possible for them to also be read as JSON given that they are using API version 2.0 or later.

Connection Parameters

Service URL

This parameter should contain the service root URI of an OData service. This should point to a valid OData service document which is able to return a list of feeds available for consumption. Each feed will generate its own feature type.

Note  This field may or may not contain a trailing solidus ("/").

A URI used to query an OData service has up to three significant parts: the service root URI, resource path, and query string options. Only the service Root URI should be specified.

For example:

A typical URI specifying an OData service looks like:

ODATA_DATASET http://services.odata.org/OData/OData.svc/

Constraints

Query Options

The available query options are Order By, Filter, and Expand. All query options are optional.

System query options are query string parameters that control the amount and order of the data returned for the resource identified by the URL. The names of all system query options are optionally prefixed with a dollar ($) character. OData Protocol V4.01 based services support case-insensitive system query option names specified with or without the $ prefix. Clients that want to work with 4.0 services must use lowercase names and specify the $ prefix.

See examples in the table below. For greater detail on these query options, visit Microsoft Query Options Overview.

Query Option

Description

Example

Result

Equivalent Query Parameter (examples from Query Options Overview)

Order By

Request resources in a particular order.

ProductID

Orders results by Product ID in descending order.

This is equivalent to specifying $orderby as query parameter in the following request URL:

http://odata/service/Categories?$orderby=ProductID

Filter

Filter a collection of resources that are addressed by a request URL.

ProductID gt 5

Returns results where the product id is greater than 5.

This is equivalent to specifying $filter as query parameter in the following request URL:

http://odata/service/Categories?$filter=ProductID gt 5

Expand

Specify the related resources or media streams to be included in line with retrieved resources.

Products

Expands the ‘Products’ key as JSON. In order to expose this attribute, you will need to specify this attribute under the ‘User Attributes’ tabs to expose it.

This is equivalent to specifying $expand as query parameter in the following request URL:

http://odata/service/Categories?$expand=Products

Advanced

Schema Attributes

Additional Attributes to Expose

Use this parameter to expose Format Attributes in FME Workbench when you create a workspace:

  • In a dynamic scenario, it means these attributes can be passed to the output dataset at runtime.
  • In a non-dynamic scenario, this parameter allows you to expose additional attributes on multiple feature types. Click the browse button to view the available format attributes (which are different for each format) for the reader.