j

    John

    9 months ago
    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.
    Kevin Kho

    Kevin Kho

    9 months ago
    Hey @John, what is the goal here? Do you just want to log the Flow completion time?
    j

    John

    9 months ago
    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
    Kevin Kho

    Kevin Kho

    9 months ago
    You can persist the value in the KV Store
    You beat me to it but this is the right place to look to hold that yep!
    j

    John

    9 months ago
    thanks for that! this feature is new since the last time i evaluated prefect. excellent!