I am trying to create a framework in Java which would support chained/pipelined queries wherein the Output of one query would be transformed to be used as input of another queries. Something like PyCascading These queries will be made at runtime. I looked upon some frameworks and came upon Apache Camel
& Spring Integration as they provide concept of Chaining and routing(Enterprise Integration Patterns). I found Apache Camel better than Spring Integration(IMHO).
Should I go for Apache Camel for my framework or is there a better way I can achieve this?
My Query Syntax would be
Query query1 = "select customer.id from customer where customer.name = 'ABC'";
Query query2 = "select account.id from account where account.custid in {$1}";
// $1 will be the input of second query
from(query1).inputto(query2).printOutput();
This is possible using camel-jdbc and a few basic Camel features (like simple) to allow you to inline the result parsing…
This result can then be used to dynamically construct subsequent queries…