https://dagster.io/ logo
Title
s

Sri Kadiyala

04/16/2021, 10:48 AM
Hello folks! I am trying to migrate a simple cron job into Dagster. I want to use the configSchema to configure my inputs. the specific config type I am interested is Enum. I was able to configure the solid with Enum field. However, on the dagit UI, I am seeing a validation error saying
Value at path root:solids:dev_datasets:config for enum type dataset_prefix must be a string
. Attached are the screenshots of code and the value we are inputing. I tried changing the input by enclosing it with single/ double quotes. I am not sure what is missing here. Thanks
a

alex

04/16/2021, 2:20 PM
looks like you did
solids:
  dev_datasets:
    config:
      dataset_prefix: dbt_cloud_pr_
but the config_schema is set to the enum field directly so should be
solids:
  dev_datasets:
    config: dbt_cloud_pr_
s

Sri Kadiyala

04/16/2021, 2:51 PM
hello @alex, thanks for the quick help. I changed the config as you suggested. now the pipeline is working. but the intention is to set ‘dataset_prefix’ to enum. Can you help on how to do that please
I think I got it working by doing the below. Can you please validate 🙂
config_schema={'dataset_prefix': Field(
                                    Enum(
                                      'dataset_prefix',
                                      [
                                        EnumValue('dbt_cloud_pr_'),
                                        EnumValue('zz_dev_'),
                                      ]
                                    )
                                   )             
                  },