I am afraid that there is no automatic way of doing so. But that would be the same answer whether the question is about hive or any relational database. (I would be glad to have counter examples.)
You might want to look at oozie in order to manage worflow. But the creation of the worflow is manual indeed. http://oozie.apache.org/ Regards Bertrand On Thu, Jun 20, 2013 at 9:59 PM, Sha Liu <lius...@hotmail.com> wrote: > Hi, > > While working on some complex queries with multiple level of subqueries, > I'm wonder if it is possible in Hive to refactor these subqueries into > different files and instruct the enclosing query to execute these files. > This way these subqueries can potentially be reused by other questions or > just run by themselves. > > Thanks, > Sha Liu > -- Bertrand Dechoux