https://prefect.io logo
Title
w

Wright Hilsman

01/19/2023, 6:24 PM
Hello All, I am currently trying to create a deployment that takes a parameter as a dictionary and not just a string. Is this possible within Prefect or is the only data you're able to provide as a parameter to a deployment a string? Best, Wright
✅ 1
z

Zanie

01/19/2023, 6:31 PM
Hi! We support any JSONable data type for parameters — and you can do more complex types by annotating flow parameters as Pydantic models.
If you share a more specific example, we can probably give some concrete guidance 🙂
w

Wright Hilsman

01/19/2023, 6:33 PM
Yeahhhh. I think I am figuring it out now. Let me build it real quick and follow up. Thanks, Michael!
Classic case of me shooting myself in the foot here.....
It was a type hint issue. Seems like I had accidentally put string in my flow code
run_snfw_to_pg_flow(transfer_dict:str, transfer_name: str)
needed to be
run_snfw_to_pg_flow(transfer_dict: Dict, transfer_name: str)
z

Zanie

01/19/2023, 6:42 PM
👍 yep we’ll coerce the input to the type annotation
w

Wright Hilsman

01/19/2023, 6:45 PM
Thanks homie for the explanation.
Will research more into Pydantic while bored today!