I am working on an application the goal of which is to allow the user to select fields on the screens and dynamically generate queries against multiple data sources.

I built a prototype web app with a bunch of drop downs. The selections are concatenated to form a complete sql statement and written as a column to a database table. I then use PME to import the tables into a business model and then export the model to metadata.xml. I then manually put together an xml with mql tags.

Not sure where to go from here. I know I want to use these artifacts that I just created, probably making calls from the struts2 java app that I built the prototype on but not sure where and what kind of api is available from pentaho. I don't think I need to BI server but I could be wrong

I am new to the BI domain so any help would be appreciated. It would be great if somebody could show me a complete example of how this is done.