I've been trying the same kind of thing these days, I have a few queries that needs to be executed against different databases and data sent to another one. All these queries are in separate sql files in one folder per db/engine. I have a function that builds a CompositeSolidDefinition object based on the content of that folder, populating everything as needed as it iterates over the sql files:
1. solid_defs (appending SolidDefinition objects from a function)
2. dependencies (building a dictionary of DependencyDefinition objects mapping to empty dicts)
3. input_mappings (I map one input from the composite to each of the solids in there (db schema).
4. I also build the related env dict that is returned with the CompositeSolidDefinition, allowing me to change my input values on the fly (mostly table names).
I then use these lists and dicts as inputs to create the CompositeSolidDefinition object.