I'm trying to create a config mapping for my job, ...
# ask-community
e
I'm trying to create a config mapping for my job, and one of the config fields is super nested and looks like this:
Copy code
Field(
    config=Map(str, Array(
        Shape(fields={
            "key1": Field(...),
            "key2": Field(
                ...
                config=Map(str, Map(str, Any)),
                ...
            )
            }
        )
    ))
)
Dagster is complaining about the
config=Map(str, Map(str, Any))
line, saying "Attempted to pass Field(<dagster._config.field_utils.Map object at 0x1112e7fa0>, default=@, is_required=True) to a Field that expects a valid dagster type usable in config (e.g. Dict, Int, String et al)." Am I missing something about when I can and cannot use certain types?
y
Copy code
@op(
    config_schema={
        "foo": Field(
            Map(
                str,
                Array(Shape(fields={"key1": str, "key2": Field(config=Map(str, Map(str, Any)))})),
            )
        )
    }
)
def my_op():
    pass


@job
def my_job():
    my_op()
this works for me