Dear prefect people, result caching question: I...
# ask-community
r
Dear prefect people, result caching question: Is it possible to add
task map input parameters
to the
task result location templates
? e.g.
"{flow_name}/{task_name}/{system_id}"
where
system_id
is an input parameter to the task run (e.g.
task.map(system_id=system_ids, further_input=unmapped(further_input))
)? I would use it instead of
{task_run_id}
, as the
task_run_id
might change with every flow run, but the
system_id
would be always the same 🤔 Or is there a smarter approach to achieving the same?
1
k
Hey @Robin, Have you seen this ? Seems exactly like what you want.
r
Yes, perfectly fits! Could be cross-referenced in the "using results" section of the docs
1
I actually also intuitively just tried it that way. However, when defining on the flow level, there might be tasks that do not have that parameter. Might be interesting to allow adding variables to the templates that are not part of all tasks' inputs and let them default to None/empty string if not provided? 🤔
Loved how elegantly one can define task result locations on the flow level, but I guess task level will also do.
k
I will write that feedback down on our backlog 🙂
🙏 1
r
Actually a philosophic question I guess,
implicit vs. explicit
👍