hello community! i am exploring options for access...
# ask-community
j
hello community! i am exploring options for accessing the last successful task run date from within a task. (similar to
{{ prev_execution_date_success }}
in airflow). i’ve had some success querying the prefect API, although one issue i’ve run into is that task ids change with each version of the task. perhaps that’s fine, but i’m curious if anyone has approached the problem in a different way.
k
Hey @John, what is the goal here? Do you just want to log the Flow completion time?
j
hi @Kevin Kho - the goal is to create a task that queries a DB for records modified since the last successful run
ah, i just came across KV stores in the docs and i see my exact use case: https://docs.prefect.io/orchestration/concepts/kv_store.html#deleting-key-value-pairs
k
You can persist the value in the KV Store
🙌 1
You beat me to it but this is the right place to look to hold that yep!
j
thanks for that! this feature is new since the last time i evaluated prefect. excellent!