this is new..used to be able to just enter my para...
# prefect-cloud
v
this is new..used to be able to just enter my parameters as strings, didn't need to provide JSON, wish there had been a headsup or something
n
Oo this looks like a regression @Vera Zabeida - let me investigate what’s up here
v
thank you : )
n
Hi @Vera Zabeida - any chance you can make a min reproducible example? I’m having trouble reproducing
v
this is the Prefect Cloud UI, in the deployments section, here's the flow code: https://github.com/VeraZab/nyc-stats/blob/main/flows/pipeline.py#L94 and i'm just trying to do a custom run where i put custom to and from dates 2015-01-01 to 2015-12-31 for example.. it used to work to just have these as strings, like literally 2-3hrs ago.. now its asking me for json...
n
Ahhhh ok, thanks for the help @Vera Zabeida, I see the issue. The problem is that your inputs aren’t typed so we don’t really know what to do with them. Rather than attempting to infer a type, it looks like we’re offering you a JSON input so you can provide what you’re looking for directly. If your flow is expecting a date string, you can use the JSON input for that like this:
(a string is valid JSON)
v
oh ok : ) i guess I was confused as this used to work a few hours ago : )
thank you!
n
However! If you add types to your inputs, the UI can get a lot more powerful there, so if you changed your code like this:
Copy code
import datetime

@flow(log_prints=True, name="extracting and loading")
  def extract_and_load(from_date: datetime.date, to_date: datetime.date):
    ...
you’ll get a much more robust experience:
v
wow thank you so much!
n
absolutely! lmk if you have any other questions
💙 2