3 Replies Latest reply on Dec 22, 2014 4:10 AM by bpiepers

    Exposing OData data source using Teiid


      In JDV it is possible to expose a model based on a call to a Rest interface or OData interface. The limitation here is that this model only reflects the results returned by a single web service call. For an OData data source, I would like to make use of the functionality of exposing the metadata as a model as described here:


      OData Translator - Teiid 8.10 (draft) - Project Documentation Editor




      OData Support - Teiid 8.10 (draft) - Project Documentation Editor (at the bottom of the article)


      Is there a description available of how to actually do this? The articles have a very limited description of how to expose an OData data source using the metadata import of an OData interface. Where can I find a more elaborate description how to map an OData data source via its metadata model in Teiid?



        • 1. Re: Exposing OData data source using Teiid

          See the blog article http://teiid.blogspot.co.uk/2013/02/integrate-odata-source-using-teiid.html for an example


          When using Designer,  use "Teiid Connection Importer"  and create "web services" connection and use "odata" translator and you should see all the metadata. If you are using SAP Netweaver, then use the translator "sap-nw".


          • 2. Re: Exposing OData data source using Teiid



            Another resource that may prove helpful: Producing and Consuming OData in Teiid and Teiid Designer

            Note that it is now possible to use the Teiid Connection Importer for OData as well. I will be updating this article soon to reflect that.




            • 3. Re: Exposing OData data source using Teiid

              The blog post here:http://teiid.blogspot.co.uk/2013/02/integrate-odata-source-using-teiid.html has been updated so you can take that example to at least have a dynamic VDB that exposes an OData model using its metadata. Using the Teiid designer you can use the connection importer like this:


              1. Make sure you have a Teiid project created and a running JDV server instance.

              2. Click on File -> Import, expand "Teiid Designer" and choose "Teiid Connection >> Source Modek" (click on "Next");

                  Note: this often results in a "Unhandled Loop Exception" in JBoss Developer Studio.

              3. A screen appears where you can select a data source to connect to. Create a new one by clicking "New..." ;

              4. Give the connection a meaningful name and choose the Webservice driver. Fill in the URL, end point  at the bottom of the screen. Make sure that this is the OData endpoint, Teiid will add the $metadata call to it to import the available tables into the data source. When finished: click "Ok" and "Next".

              5. Make sure you choose "odata" as the translator and choose a location for your datasource model and give a meaningful name to the source model.

                 Note: in my use case, I was connecting to a SAP Gateway OData interface. In this case choose "sap-nw-gateway" as the translator. Click "Next".

              6. Teiid automatically creates a new dynamic VDB with which it fetches and imports the tables derived from the $metadata call to the OData backend. When finished, Teiid shows the results of the import. You can then optionally create a view model that uses the created source model to define your view.