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

Evan O'Brien

07/21/2023, 5:43 PM
Hey All, simple question i hope. I have a fan out dynamic op, and a subsequent op that depends on its output AND an io manger input. Just not sure how to declare both inputs together. Documentation seems unclear and couldnt find any examples. (<not sure what goes here> is where i have the question):
Copy code
@op(out=DynamicOut())
def get_configs (context: OpExecutionContext) -> SomeConfig:

    for config in configs:
        yield DynamicOutput(mapping_key=config_key, value=config)
Copy code
@op(ins={
    "data": In(input_manager_key="some_io_manager"),
    "config": <Not sure what goes here>)
    }, 
    out=Out(io_manager_key="some_io_manager"))
def op_2 (context, data, config: SomeConfig):
a

alex

07/21/2023, 5:58 PM
is
APIJobScrapeConfig
a child of
Config
? if so you just omit that from
ins
e

Evan O'Brien

07/21/2023, 6:07 PM
hmm that was my initial attempt. if I do that and map them in a graph_asset:
Copy code
@graph_asset()
def example_asset():
    return get_configs().map(op_2)
i receive a DagsterInvalidDefinitionError, saying the config has no way of being resolved
is it true that order of op arguments could cause this? i swapped data and config in op_2 and it seemed to pass?
a

alex

07/21/2023, 6:23 PM
hmm sounds like a bug though glad the order change worked around it - would you game to file an issue?
e

Evan O'Brien

07/21/2023, 6:23 PM
yep for sure