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

Charlie Bini

04/21/2022, 4:28 PM
potentially silly question: is there a way to define multiple values for a
Field
in a
config_schema
? Sort of like
Any
but restrict it to only one or two types
z

Zach

04/21/2022, 4:55 PM
maybe a Selector ?
👍 1
c

Charlie Bini

04/21/2022, 5:08 PM
Selector
is close I think, but I'm not sure it's worth adding that much complexity--you'd have to specify the data type via an additional key. It looks like
ScalarUnion
only accepts one type for the scalar/non-scalar options.
Ideally, I'd like to do something like
Field([String, Int], is_required=False)
but I don't think that's possible right?
j

johann

04/21/2022, 5:10 PM
Nope. If this is for inputs/outputs, you can create a custom type https://docs.dagster.io/concepts/types#defining-a-dagster-type
5 Views