3 Replies Latest reply on Aug 4, 2014 12:02 PM by Ramesh Reddy

    Does the Teiid MongoDB translator support the varbinary datatype?

    Michael Farwell Newbie

      Versions:
      Teiid 8.8

      MongoDB 2.6.3

       

      vdb.xml
      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <vdb name="tracks" version="1">
        <model name="tracks">
          <source name="tracks" translator-name="mongodb" connection-jndi-name="java:/mongoDS"/>
          <metadata type="DDL"><![CDATA[
            CREATE FOREIGN TABLE  track_points (
              name varchar(25),
              id integer,
              ts timestamp,
              uuid varbinary(100)
            )
            OPTIONS(UPDATABLE 'TRUE');]]>
          </metadata>
        </model>
      </vdb>

       

      db.track_points.find()

      { "_id" : 1, "uuid" : BinData(3,"FKKq1/oBQKSKgAQkK5Ru5A=="), "name" : "point 1", "id" : 1, "ts" : ISODate("2013-01-01T00:00:01Z") }

       

       

      Query:
      select * from track_points

       

      Error:
      TEIID10076 Invalid conversion from type class java.lang.Object with value 'a44001fa-d7aa-a214-e46e-942b2404808a' to type class org.teiid.core.types.BinaryType