1 Reply Latest reply on Jan 30, 2015 8:09 AM by Ramesh Reddy

    TEIID24005 exception while federating data between SimpleDB and any other source

    VIJAY KUMAR Newbie

      Hi Ramesh/Steven,

       

      I'm using Teiid embedded, and facing an exception while trying to create a Virtual Model (Type: DDL) by inner-joining a Amazon SimpleDB table with a H2 (or any other database) table. Following is the exception stack trace:

       

      Caused by: org.teiid.translator.TranslatorException: TEIID24005 ORDER BY is only supported when Order By column is also part of the WHERE clause
          at org.teiid.translator.simpledb.SimpleDBSQLVisitor.validateOrderBy(SimpleDBSQLVisitor.java:116)
          at org.teiid.translator.simpledb.SimpleDBSQLVisitor.visit(SimpleDBSQLVisitor.java:93)
          at org.teiid.language.Select.acceptVisitor(Select.java:103)
          at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51)
          at org.teiid.language.visitor.SQLStringVisitor.append(SQLStringVisitor.java:90)
          at org.teiid.translator.simpledb.SimpleDBQueryExecution.<init>(SimpleDBQueryExecution.java:59)
          at org.teiid.translator.simpledb.SimpleDBExecutionFactory.createResultSetExecution(SimpleDBExecutionFactory.java:79)
          at org.teiid.translator.simpledb.SimpleDBExecutionFactory.createResultSetExecution(SimpleDBExecutionFactory.java:34)
          at org.teiid.translator.ExecutionFactory.createExecution(ExecutionFactory.java:300)
          at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:317)
          at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298)
          at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110)
          at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:107)
          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.FutureWork.run(FutureWork.java:58)
          at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274)
          at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
          at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:214)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:722)
      
      
      


      I do understand that Amazon SimpleDB itself poses this restriction of having the sort attribute present in at least one of the predicates (as mentioned in https://aws.amazon.com/articles/1231), but I'm wondering why this error comes up only when when processing an INNER JOIN between SimpleDB table's and another table's column from other DB (e.g. H2)?

       

      The schema text of my DDL model is:

      create view \"portfolio\" as select PUBLIC.PRODUCT.SYMBOL, COMPANY_NAME FROM PUBLIC.PRODUCT INNER JOIN WATCH ON PUBLIC.PRODUCT.SYMBOL = WATCH.SYMBOL


      Attached is the log file from Teiid Engine (TRACE level enabled).


      Please help.