Erik
03/01/2022, 4:49 AM@op(out=DynamicOut(int), config_schema={"start": int, "stop": int)
def generate_things(context) -> int:
for i in range(context.op_config["start"], context.op_config["stop"]):
yield DynamicOutput(value=i, mapping_key=f"{i}")
@graph
def graph_of_complex_things(i):
... # do graph of things with i
@job
def dynamic_size_ordered_job():
for i in generate_things():
graph_of_complex_things(i)
I was poking around and generate_things().map(graph_of_complex_things)
is the closest thing I can find but isn't ordered@op(out=DynamicOut(int), config_schema={"start": int, "stop": int)
def generate_things(context) -> int:
for i in range(context.op_config["start"], context.op_config["stop"]):
graph_of_complex_things.execute_in_process(config, resources)
@graph
def graph_of_complex_things(i):
... # do graph of things with i
@job
def dynamic_size_ordered_job():
generate_things():
alex
03/02/2022, 3:19 PMin an ordered waycan you be more specific about what you mean here?
Erik
03/04/2022, 12:45 AMHunter Young
03/15/2022, 9:15 PMalex
03/15/2022, 9:20 PMyou can’t define graphs/jobs at runtimecorrect
Hunter Young
03/15/2022, 9:26 PMalex
03/15/2022, 9:32 PMHunter Young
03/15/2022, 10:03 PMalex
03/15/2022, 10:14 PMrun_config
targets a well defined schema that is a property of the JobDefinition
. If you want to make a yaml -> job/graph system, you will have to manage that yourself outside of dagit