Problem: I'd like to load and combine multiple contexts of different types in Talend
I have various contexts defined such as evnContext, runContext, clientContext. For example, suppose i have 4 different clients (A, B, C, D) and 4 different run types (small, medium, large, huge). These context settings are independent. To configure a single context for each possibility would require 16 contexts. Is there a "nice" way to combine them in Talend? In the studio, we can create Contexts. I would create a separate context for each of the above and call these my context_types. Then for each context type, I can configure different instances. Finally, i would need a MetaContext whose fields would be the context types and whose values would be the instances MetaContext metaconf1 metaconf2 envContext Production_Mac Development_Linux runContext small huge clientContext "Spaghetti Soup" "KimJungUn" Now i can do repeated runs every day for a month for my metaconfs, or change/add a new metaconf as needed. --------------------------- I have considered joining the sub-contexts into a complete context with something like: ## stone soup approach - add them all and avoid name collisions by convnetion for context_type in context_types tLoadContext(getInstanceName(metaconf, context_type) globalMap.putAll(context) since globalMap is a java.util.Map() ## or name-mangling approach As above but so that context.var1 in globalMap(context1) becomes context.context1_var1 . It would be nice if Talend had some context merge tool, or if some simple components could do the job. So i though i'd ask here first before coding it up. Or see if anyone could suggest a better approach. thanks, kesten
I know this post started a while back, but I would also like to merge contexts groups. For example if I set-up 2 db's on my dev environment and save each as a context these end up in different context groups if I try to save to the same context group I get an error. So I now have 2 context groups that appear to not to talk to each other as if a context within that group is renamed to the same name i.e. Dev, UAT, Prod. I then get 2 of these values appearing in the run job context selector... I'm I doing something fundamentally wrong, is a context group merge possibe, or is this a new feture request?