Brad
11/24/2019, 3:15 PMSelector
type to limit input values in a config file?
I'm trying to configure a solid with multiple parameters, but where one of the parameters is necessarily fixed to be one of a set of possible valuesnate
11/24/2019, 3:27 PMBrad
11/24/2019, 4:08 PMEric
11/25/2019, 6:01 PMnate
11/26/2019, 10:35 PMconfig = {
'myconfig': Selector({
'primary': Field(Dict(fields={
'b': Field(str),
'c': Field(int),
},
'secondary': Field(bool),
}),
}
with this schema,
myconfig:
primary:
b: "test"
c: 2
and
myconfig:
secondary: True
are both valid configurations. In contrast, Enum
is useful when you have a fixed set of scalar configurations to choose from. Hope that helps!