Skip to content

Error reading table config properties #154

@vidhav

Description

@vidhav

When I try to pass a list of properties in my configuration:

TABLE_CONFIG__public_mytable__PROPERTIES=["name","type","status"]

I get the following error from Pydantic:

table_config.public_mytable.properties
  Input should be a valid list [type=list_type, input_value='["name","type","status"]', input_type=str]

I believe this is because Pydantic settings only parses JSON in the top-level (as stated in the docs):

JSON is only parsed in top-level fields, if you need to parse JSON in sub-models, you will need to implement validators on those models.

In this case, the values are nested and validated with a TypedDict (see the code). For this to work, the code may need to be refactored to be BaseSettings with a custom validator to handle the parsing...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions