4 Replies Latest reply on May 29, 2014 4:15 PM by Ivan Chan

    Can't get metadata from Amazon Redshift (Postgres) using Teiid 8.7

    Ivan Chan Apprentice

      Hi all,

       

      I have a few questions about Amazon Redshift.  Do you guys support Amazon Redshift?  Amazon Redshift is based on PostgreSQL 8.0.2.  Therefore, I tried to use PostgreSQLExecutionFactory for Redshift with Teiid 8.7, but I got the following exception.

       

      aused by: org.teiid.core.TeiidComponentException: TEIID30489 Unable to load metadata for VDB -686816004 1.
              at org.teiid.dqp.internal.process.Request.initMetadata(Request.java:191)
              at org.teiid.dqp.internal.process.Request.processRequest(Request.java:433)
              at org.teiid.dqp.internal.process.PreparedStatementRequest.processRequest(PreparedStatementRequest.java:289)
              at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:609)
              at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:315)
              at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
              at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:254)
              at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:295)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:601)
              at org.teiid.transport.LocalServerConnection$1$1.call(LocalServerConnection.java:170)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)
              at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274)
              at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:258)
              at org.teiid.transport.LocalServerConnection$1.invoke(LocalServerConnection.java:168)
              at $Proxy160.executeRequest(Unknown Source)
              at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:634)
              at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:509)

       


      Do you guys have any clue?

       

      Thanks,

       

      Ivan

        • 1. Re: Can't get metadata from Amazon Redshift (Postgres) using Teiid 8.7
          Ramesh Reddy Master

          Not really tested Amazon RedShift. Can you try to connect it through SQL client like SQuirreL and let us know if you see metadata and able to issue queries?

          • 2. Re: Can't get metadata from Amazon Redshift (Postgres) using Teiid 8.7
            Ivan Chan Apprentice

            Yes, it works.  I can see metadata/ issue queries if I get the javax.sql.DataSource object and call getConnection() from there.   But I passed that javax.sql.DataSource object to Teiid directly, then it returned error that I mentioned in first comment.

            • 3. Re: Can't get metadata from Amazon Redshift (Postgres) using Teiid 8.7
              Ramesh Reddy Master

              So it does not work with Driver class from SQL client? Also, there must have been other errors before you saw above exception, can you check logs?

              • 4. Re: Can't get metadata from Amazon Redshift (Postgres) using Teiid 8.7
                Ivan Chan Apprentice

                i will try with SQL Client later.

                 

                Here is the log:

                 

                Caused by: org.teiid.jdbc.TeiidSQLException: TEIID30489 Unable to load metadata for VDB name

                         at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)

                         at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)

                         at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:667)

                         at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:63)

                         at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:515)

                         at org.teiid.client.util.ResultsFuture.addCompletionListener(ResultsFuture.java:148)

                         at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:511)

                         at org.teiid.jdbc.PreparedStatementImpl.executeQuery(PreparedStatementImpl.java:261)

                         at org.teiid.jdbc.DatabaseMetaDataImpl.getTables(DatabaseMetaDataImpl.java:1482)

                         ... 150 more

                Caused by: org.teiid.core.TeiidComponentException: TEIID30489 Unable to load metadata for VDB name

                         at org.teiid.dqp.internal.process.Request.initMetadata(Request.java:191)

                         at org.teiid.dqp.internal.process.Request.processRequest(Request.java:433)

                         at org.teiid.dqp.internal.process.PreparedStatementRequest.processRequest(PreparedStatementRequest.java:289)

                         at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:600)

                         at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:309)

                         at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)

                         at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:248)

                         at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:295)

                         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                         at java.lang.reflect.Method.invoke(Method.java:606)

                         at org.teiid.transport.LocalServerConnection$1$1.call(LocalServerConnection.java:170)

                         at java.util.concurrent.FutureTask.run(FutureTask.java:262)

                         at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:273)

                         at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:257)

                         at org.teiid.transport.LocalServerConnection$1.invoke(LocalServerConnection.java:168)

                         at com.sun.proxy.$Proxy162.executeRequest(Unknown Source)

                         at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:634)

                         at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:509)

                         ... 152 more