Take look at the procedure language here https://docs.jboss.org/author/display/teiid81final/Procedure+Language
I am guessing, based on the input parameter you can use the IF Statement construct to change the select statement you execute with different ServiceManager.
1 of 1 people found this helpful
In addition to if/else there are a couple of other options. You could use multisource models for the soap services. In multisource mode if you have a parameter name "SOURCE_NAME", then the procedure will be invoked against the source with that name.
You can also use dynamic sql, with the drawback of some additional overhead for creating the dyanmic plan.
I am able to condition the Query which works. I used EXECUTE IMMEDIATE <String query> USING <variables>.
I would like your idea as well which may be helpful in later stages of development. Is multisource mode available in Teiid 7.7 and does 7.8 designer supports it? If you have any document reference please send them.
Designer should support it, but I'm not entirely sure what the mechanics are in the GUI. From a Teiid side all we're looking for is additional metadata in the vdb.xml, see https://docs.jboss.org/author/display/teiid/Multi-Source+Models or the analogous section in the 7.7 docs.