Skip to main content
Skip table of contents

OData V2 Connector

The Open Data Protocol (OData) is a data access protocol built on core protocols like HTTP and commonly accepted methodologies like REST for the web. For more information about the OData interface, please refer to the dedicated page in the User Guide.

The OData V2 translator, known by the type name odata, exposes the OData V2 data sources and uses the CData Virtuality web services resource adapter for making web service calls. These translators are an extension of the Web Services Translator.

CData Virtuality maps OData CSDL (Conceptual Schema Definition Language) document from the provided OData endpoint and converts the OData metadata into the CData Virtuality relational schema. The following tables show the mapping selections in the OData translators from a CSDL document

OData V2

Mapped to Relational Entity

EntitySet

Table

ComplexType

Ignored

FunctionImport

Procedure

AssociationSet

Foreign keys on the table

All RUD operations will be appropriately mapped to the resulting entity based on the SQL submitted to the OData translator.

Usage

Usage of an OData source is similar to a JDBC translator. The metadata import is supported through the translator. Once the metadata is imported from the source system and exposed in relational terms, this source can be queried as if the EntitySets and FunctionImports were local to the CData Virtuality system.

You can connect OData as a data source.

Example

OData V2 data source based on a third-party public service:

SQL
CALL SYSADMIN.createConnection("name" => 'odata_parlament',
	"jbossCliTemplateName" => 'ws',
	"connectionOrResourceAdapterProperties" => 'EndPoint=https://ws.parlament.ch/odata.svc/,decompressCompressedFiles=false,SecurityType=None', encryptedProperties => '');;
	
CALL SYSADMIN.createDatasource("name" => 'odata_parlament',
	"translator" => 'odata');;

You can SELECT data from the tables:

SQL
SELECT * FROM "v2_Northwind.Territories";;

Limitations

  • CREATE, DROP, SELECT INTO are not supported;

  • OData functions are not fully supported at present;

  • Any type of JOIN is not pushed down.

For OData interface limitations, see the ‘Limitations’ section on the dedicated page in the User Guide.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.