Brian Newman
11/17/2023, 6:41 PMMarvin
11/17/2023, 6:41 PMfrom prefect import flow
from datetime import datetime
@flow
def what_day_is_it(date: datetime = None):
if date is None:
date = datetime.utcnow()
print(f"It was {date.strftime('%A')} on {date.isoformat()}")
what_day_is_it("2021-01-01T02:00:19.180906") # It was Friday on 2021-01-01T02:00:19.180906
3. Validate your parameters: Parameters are validated before a flow is run. If a flow call receives invalid parameters, a flow run is created in a Failed state. If a flow run for a deployment receives invalid parameters, it will move from a Pending state to a Failed state without entering a Running state.
For more detailed information, you can refer to the Prefect documentation.