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

Constraints

Query Options

Note  Query Options can be set at the reader level, or at the feature type level.

The available query options are Order By, Filter, and Expand. All fields 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.

To expose this attribute, you will need to specify it in the workspace: Open the Feature Type parameters and click the User Attributes tab.

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

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

Schema Attributes

Spatial

Advanced