antonl
02/09/2021, 8:08 PMalex
02/09/2021, 8:13 PMexecute_solid
and .alias()
I think this might work :
from dagster import configured, solid, execute_solid
_MESSAGE_ALIAS_KEY = "say[{message}]"
@solid(
config_schema={
"message": str
}
)
def say(context, name: str) -> str:
message = context.solid_config.get("message")
return f"{message} {name}!"
def message_factory(message):
return say.configured(
{"message": message},
name=_MESSAGE_ALIAS_KEY.format(message=message)
)
say_hello = message_factory("hello")
result = execute_solid(say_hello, input_values={
"name": "Dagster"
})
antonl
02/09/2021, 8:16 PMalex
02/09/2021, 8:22 PMthe acceptable name format is different from the acceptable alias formatuh oh
antonl
02/09/2021, 8:25 PMsolid_name[$key]
, but the regex for solid names only allows ^[A-Za-z0-9_]+
.alex
02/09/2021, 8:26 PMantonl
02/09/2021, 8:27 PMalex
02/09/2021, 9:00 PM