millions-night-34157
09/04/2023, 11:17 AMdate -1 as input.
So when I use datetime.strptime(date.get(), "%Y-%m-%d") - datetime.timedelta(days=1) , Flyte throws 'Promise' object has no attribute 'get' error.
Using datetime.strptime(date, "%Y-%m-%d") - datetime.timedelta(days=1) throws strptime() argument 1 must be str, not Promise error.
Any idea how to handle this isse?
@workflow
my_workflow(date: str, name: str) -> bool:
yesterday = str(datetime.strptime(date.get(), "%Y-%m-%d") - datetime.timedelta(days=1))
my_task(yesterday)
@task
my_task(yesterday: str):
# task related codetall-lock-23197
my_task? date and name in the workflow are promises, and the values will be materialized only in a task.millions-night-34157
09/04/2023, 1:28 PMmillions-night-34157
09/04/2023, 3:26 PM