dwall
02/04/2020, 7:04 PMNothing
input/output type to model dependencies between solids that don't rely on input/output. This seems to work well most of the time, but I'm getting stuck on how to leverage this for reusable solids that have a dynamic amount of upstream and/or downstream dependencies. An example of this is a dbt_run
solid we have. This dbt_run
solid can theoretically be dependent on 1 to n number of upstream solids. Currently, it feels like the only way to model this in Dagster is to create the solid with n number of Nothing
input definitions. This doesn't feel intuitive to me so I'm wondering if there is something I'm missing here.max
02/04/2020, 7:12 PMList[Nothing]
alex
02/04/2020, 7:12 PMMultiDependencyDefinition
if constructing directlymax
02/04/2020, 7:12 PMNothing
machinery by providing composition function syntax that lets you just have solids depend on each othersolid_b.after(...)
or solid_b().depending_on(...)
or somethingdwall
02/04/2020, 7:13 PMmax
02/04/2020, 7:13 PMdwall
02/04/2020, 7:14 PMmax
02/04/2020, 7:14 PMdwall
02/04/2020, 7:16 PMNothing
type input definition shouldn't really care about the number of Nothings it receivesalex
02/04/2020, 7:16 PMx = solid_a()
y = solid_b()
z = solid_c()
dbt_run(on_complete=[x, y, z])
max
02/04/2020, 7:17 PMNothing
inputs multi-dependencies? like List[Nothing]
is Nothing
?alex
02/04/2020, 7:17 PMNothing type input definition shouldn’t really care about the number of Nothings it receivesIf this isn’t how it works today it probably should
dwall
02/04/2020, 7:17 PMalex
02/04/2020, 7:17 PMdwall
02/04/2020, 7:19 PMalex
02/04/2020, 7:20 PMList[Nothing]
- you just use Nothing
and it accepts an incoming listdwall
02/04/2020, 7:21 PMalex
02/04/2020, 7:22 PMNothing
dwall
02/04/2020, 7:22 PMNothing
input and outputalex
02/04/2020, 7:22 PMdwall
02/04/2020, 7:26 PMinput_def=InputDefinition(Nothing)
should work, but input_defs=[InputDefinition(Nothing)]
does not work?Nothing
inputsalex
02/04/2020, 7:27 PMinput_def=InputDefinition(Nothing) should work, but input_defs=[InputDefinition(Nothing)] does not work?No I am saying
InputDefinition(List[Nothing])
is a problemNothing
input defs as you want - though likely you only really need a single one that you can fan-in to if you needdwall
02/04/2020, 7:28 PMalex
02/04/2020, 7:30 PMdwall
02/04/2020, 7:31 PMNothing
type, that List[Nothing]
fan-in process doesn't work as expectedalex
02/04/2020, 7:33 PMx = solid_a() # returns Nothing
y = solid_b() # returns Nothing
z = solid_c() # returns int (oh no!)
dbt_run(on_complete=[x, y, z]) # fails because thers an int in the list
dbt_run(on_complete=[x, y]) # works fine
dwall
02/04/2020, 7:34 PMon_complete
paramsolid_a(solid_b())
alex
02/04/2020, 7:38 PMdbt_run([x, y])
is the sameon_complete
just my imagined InputDefinition('on_complete', Nothing)
dwall
02/04/2020, 7:48 PMmax
02/04/2020, 9:13 PMdwall
02/04/2020, 9:14 PM