Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-4217

Add support for Name In Source to MongoDB translator

    XMLWordPrintable

Details

    Description

      MongoDB translator currently ignore NAMEINSOURCE option on the table, unlike e.g. the JDBC translators.

      So for instance querying a vdb like this:

      <vdb name="mongo" version="1">
          <model name="mongo">
              <source name="local" translator-name="mongodb" connection-jndi-name="java:/mongoDS"/>
              <metadata type="DDL"><![CDATA[
                  CREATE FOREIGN TABLE MyOrders (
                      OrderID integer PRIMARY KEY,
                      CustomerId integer,
                      OrderDate date,
                      Status integer
                  ) OPTIONS(UPDATABLE 'TRUE', NAMEINSOURCE 'CustomOrders');
                  ]]>
      
              </metadata>
          </model>
      </vdb>
      

      will create a collection called 'MyOrders' in the database, rather than 'CustomOrders'

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              asmigala@redhat.com Andrej Smigala
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: