https://prefect.io logo
a

Alex Caruso

06/28/2023, 7:33 PM
Hi all, I’m having some issues with inputting
dict
type parameters in the Prefect UI and was wondering if anyone has come across the same I have a flow parameter
snowflake_load_config_overrides
specified with a default value of
None
and type hint of
dict
Copy code
snowflake_load_config_overrides: dict = None
When I attempt to input a dictionary parameter in the UI, the flow fails with the error
Copy code
prefect.exceptions.ParameterTypeError: Flow run received invalid parameters:
 - snowflake_load_config_overrides: value is not a valid dict
It appears if I inspect the parameter, it is being interpreted as a string, not as a Python dictionary
Copy code
"snowflake_load_config_overrides": "{\"s3_stage_name\":\"S3_STAGE\",\"s3_prefix\": . . .
Any insights? Might this be a bug with the parameter validation logic?
UI is just giving me a free text entry box, it doesn’t seem to know that this is meant to be
dict
datatype
Upon further inspection, it appears my dictionary is considered invalid because it contains newlines and trailing commas, so the parameter validation logic is coercing it to a string. It is technically a valid dictionary, but copy-pasted into the UI it has issues