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.
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/
If the OData service requires Basic or NTLM authentication, specify it here.
These fields are enabled when authentication is in use.
Constraints
OData versions 3.0 and later provide support for spatial data in two types: geography and geometry.
This parameter allows you to choose which type will be used as the feature geometry. The spatial type that is not selected will be treated as an attribute on the schema, where its GeoJSON data will be taken as the attribute values.
Source Geometry Type |
Supports |
Coordinate System |
Result |
---|---|---|---|
Geography |
points, lines, polygons, and collections |
EPSG:4326 |
All OData properties within a feed that are geography types will be aggregated onto the feature geometry. All geometry types will be treated as attributes. |
Geometry |
points, lines, polygons, and collections |
None |
All OData properties within a feed that are geometry types will be aggregated onto the feature geometry. All geography types will be treated as attributes. |
None |
|
|
All OData properties within a feed that are either geometry or geography types will be treated as attributes. There will be no feature geometry. |
A list of feeds in the OData service for which to generate feature types. After entering a valid OData service root URI, click the browse [...] button to list the feeds contained in the service.
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
This optional parameter specifies how many features to request from the OData service in a single request. The OData Reader will issue paginated requests until all features are read.
If this parameter is not provided, then the OData Reader will read as many features as the server returns in a single request, and automatically obey any server-side pagination.
Default: 1000
Use this parameter to request a specific OData response format version from the server. It is possible to explicitly request responses compliant with OData version 2.0 or OData version 4.0.
Prior to FME 2022.0, web access through this format would automatically disable HTTPS Certificate verification when an SSL Error was received from the server. Now, this behavior must be explicitly enabled or disabled by this parameter.
The value of this parameter takes priority over the value of the Verify SSL Certificates parameter which might be defined by the Web Connection used with this format.
The number of seconds that requests will wait for your client to establish a connection to the OData service.
The default is 120 seconds.
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.