https://dagster.io/ logo
#ask-community
Title
# ask-community
m

Martim Passos

05/10/2022, 9:40 PM
How does one guarantee that an op executes after all DynamicOuts ops conclude? Currently I have
Copy code
items = get_items()
    items.map(tile_image)
    items.map(write_manifests)
    upload_collections(items.collect())
but this seems to trigger
upload_collections
immediately after resolving
write_manifests
inputs, not after it returns (I don’t need any data to
upload_collections
, it just needs to run when it’s all done). Also, does this code ensure that an
item
’s
tile_image
will conclude before it’s
write_manifests
starts?
a

alex

05/10/2022, 9:45 PM
you need to explicitly connect things you want to depend on each other, so in its most terse form:
upload_collections(get_items().map(tile_image).map(write_manifests).collect())
can also do it line by line
Copy code
items = get_items()
    tiled = items.map(tile_image)
    written = tiled.map(write_manifests)
    upload_collections(written.collect())
👌 1
does that make sense?
this may have been refreshed since you last looked https://docs.dagster.io/concepts/ops-jobs-graphs/dynamic-graphs
m

Martim Passos

05/10/2022, 9:59 PM
ah yes, didn’t realize I could
map
that way
2 Views