https://dagster.io/ logo
Title
j

Josh Lloyd

06/09/2021, 3:34 PM
How do I get setup a solid with one or more input dependencies and one or more order-based dependencies? I’ve tried:
@solid(
    input_defs=[
        InputDefinition("start_after", Nothing),
        InputDefinition("shell_command", str),
        InputDefinition("env_dict", dict),
    ],
    output_defs=[OutputDefinition(str, "result")],
)
def run_shell_command(context, shell_command, env_dict):
    ...
I’m invoking the solid as follows:
run_shell_command([store_secret_locally()], solid_1(), solid_2())
but I get an error:
dagster.core.errors.DagsterInvalidDefinitionError: Invalid dependencies: for solid "store_secret_locally" input "shell_command", the DagsterType "String" does not support fanning in (MultiDependencyDefinition). Use the List type, since fanning in will result in a list.
a

alex

06/09/2021, 3:48 PM
use
kwargs
run_shell_command(start_after=[store_secret_locally()], shell_command=solid_1(), env_dict=solid_2())
we use the decorated functions positional args as the source of truth when you are passing by argument order, not the
input_defs
list
j

Josh Lloyd

06/09/2021, 3:48 PM
perfect. Thanks!
a

alex

06/09/2021, 3:49 PM
@Dagster Bot issue better error for positional arguments with Nothing inputs
d

Dagster Bot

06/09/2021, 3:49 PM