6 Replies Latest reply on Jan 20, 2016 3:08 PM by Steven Hawkins

    How to access VDB using OData V4 (instead of V2)

    Simon Evenepoel Newbie



      I am running teiid 8.12.3 and have a virtual database (VDB) configured which I try to access using OData V4 in the JSON format. Surfing to http://host/odata/vdb/view?$format=json yields a response, but an OData V2 response if I am not mistaken.


      However, on these release notes: teiid: 8.11 Final Released, Support for OData V4 and SAP HANA I read the following:

      "TEIID-2973 OData V4 Access your VDB using OData V4 protocol".


      So I assumed that it would be possible. However I can't find any information on accomplishing what I need. Can you explain to me how I can address my data using the V4 version of the OData protocol instead of the V2 version ? Or can you point me to some reference documentation which I might have overlooked?


      To clarify the distinction between what I have and what I need: The json being rendered by my local teiid instance looks like this: (V2 specification were each {...} represents an entity):

           "d" : {
               "results" : [ {...}, {...} , ... ]


      But our OData client expects the following json format (V4 specification) for a list of entities:


           "@odata.context": "...",
           "@odata.count": 37,
           "value": [{...}, {...}, ... ]


      Kind regards and thanks in advance for your help