Not really. So we use a custom function to get input dates because for majority of our pipelines, it is
current-date - 1
or
current-date
that is required.
@task
def get_input_date(date: Optional[str]) -> str:
date = datetime.now().strftime("%Y-%m-%d") if not date else date
return date
@task
def input_date_task(date: Optional[str] = None) -> str:
if not date:
return (datetime.today() - timedelta(days=1)).strftime("%Y-%m-%d")
else:
return date
In this case the behaviour I saw by running the below
pyflyte backfill -p project_test -d feature-branch -n test-backfill --execute --from-date 2024-03-23 --to-date 2024-03-25 launch_plan_fi
is a workflow that ran sub workflows for every cron schedule associated to the launch_plan but for each of those executions, it only picked the current date(25th March, 2024) because of our logic.
I assume that
from-date
or
to-date
works if our input date picks the
kickoff_time
otherwise its the above behaviour.