https://dagster.io/ logo
r

Rubén Lopez Lozoya

03/08/2021, 8:40 AM
Hi team, I have a doubt regarding composite solids. I want to call the same composite solid from within a pipeline twice with different inputs for a specific solid within the composite, how can I do that programatically?
What I was thinking is to add config schema to the composite and then use it as a configured solid, but not sure if this is the best approach or if it can be done at all
s

schrockn

03/08/2021, 4:08 PM
By different inputs, do you mean different dependencies? Or a different value for a particular input?
r

Rubén Lopez Lozoya

03/08/2021, 4:09 PM
A different value for a particular input, what I've ended up doing is to use config_schema and config_fn to map composite solid schema to the solids config schema within the composite
s

schrockn

03/08/2021, 4:15 PM
If you are specifying the input values via config, you can provide separate config either directly or through the config mapping function as you describe.
r

Rubén Lopez Lozoya

03/08/2021, 4:17 PM
Thanks! And a last question 🙂 do you have a preferred choice?
s

schrockn

03/08/2021, 4:17 PM
I think it depends on your situation!
Oh and to be clear the inputs would be done via the input mapping facility. You can declare inputs on composites and thread them to the appropriate solid in the composition function
r

Rubén Lopez Lozoya

03/08/2021, 4:19 PM
Ah so it's basically the same mechanism as with config, that's good to know, because I tried and did not work before since I did not add the input mapping
Thanks a lot, really fan of Dagster so far! 🙂