1 Reply Latest reply on Feb 21, 2013 1:00 PM by rareddy

    Runtime Binding for Teiid Source Models

    tanmoypalit

      Hi,

      Is it possible to provide a feature in Teiid which will allow to create a dynamic runtime binding for the Teiid Source Model?

      With this process,

      • One can create a Source Model manually
      • Bind the model to a SQL query
      • The SQL Query will be excuted at runtime using a JDBC connection

       

      With the above process it will be possible to develop models without reading metadata from sources and this could be really useful in case of JDBC drivers/Data Sources which doesn't allow access to metadata (https://community.jboss.org/thread/213985) .

       

       

      Any thoughts?

       

       

      -

      Regards

      Tanmoy

        • 1. Re: Runtime Binding for Teiid Source Models
          rareddy

          Tanmoy,

           

          Yes. You can create a Dynamic VDB (it is just a XML file) using the DDL for metadata for your source and deploy it using Admin API into Teiid. Once you deploy it, then you can access it using JDBC connection to the VDB.

           

          example (loopy-vdb.xml)

           

          <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
          <vdb name="Loopy" version="1">
              <property name="UseConnectorMetadata" value="true" />
              <model name="MarketData">
                  <source name="text-connector" translator-name="loopback" />
                   <metadata type="DDL"><![CDATA[
                          CREATE FOREIGN TABLE G1 (e1 string, e2 integer);
                  ]]> </metadata>
              </model>
          </vdb>
          

           

          If need to drive all these programmatically you can do that too.

           

          Ramesh..