I'm surprised that the config schema doesn't have ...
# ask-community
g
I'm surprised that the config schema doesn't have an options parameter for things like:
Copy code
options=['initial_insert', 'update']
or
Copy code
options=['raw','target']
So that you would have the config schema validation fail (or provide suggestions) before you have to raise a ValueError within a pipeline, unless I'm missing something?
1
Also confused by why this is the case?
Copy code
Description: required arguments should not specify default values
Ideally I want this, which feels like it'd be a very common style of validation?
Copy code
'run_type': Field(str, 
        description='Insert type of the pipeline run, e.g. update or initial_insert', 
        options=['update','initial_insert'], # TODO: not currently supported but surprised by that
        default_value='update',
        is_required=True),
j
Copy code
required arguments should not specify default values
This is because the default value applies when an argument is not provided, which can’t occur for required args
g
Got ya, I thought the default value would pre-fill it, but I guess that comes from the yaml config.
j
I’m not sure I’m following your question around ‘options’- but I think it may match
Selector
? https://docs.dagster.io/_apidocs/config#dagster.Selector
1
g
@johann looks perfect