Pedro Machado
09/22/2020, 3:29 AMstart_date
and end_date
. These can come from two Parameters
or, if the parameters are not provided, the dates are computed after applying some logic to prefect.context.scheduled_start_time
.
I'd like to use the computed start and end dates for templating the task result's location. If these dates are passed as task inputs, they are accesible (I can do this location="{start_date}_{end_date}.txt"
) but I'd also like to use these variables in some downstream tasks that don't list them as inputs.
Is there another way for a downstream task to access these? Since they don't always come from a Parameter, they are not available in prefect.context.paramters
. I tried adding them to the context at run time with prefect.context["start_date"] = start_dt
but modifying the context like this doesn't feel right. Any suggestions?nicholas
09/22/2020, 3:32 AMPedro Machado
09/22/2020, 3:49 AM