GitHub user potiuk added a comment to the discussion: Add the ability to 
backfill a DAG based on past Asset Events

> Given your answer, I'm not 100% sure we understood each other: the UX to 
> "backfill" this DAG could be exactly the same as the one currently existing. 
> It's just that currently, when you try to backfill a DAG triggered on Asset 
> events, you select a time period, and it always shows "No runs matching 
> selected criteria", 

* Yes - because asset-triggered events are not "time-triggered" and backfill 
backfils ... well ... time

> could be exactly the same as the one currently existing.

Well - what you would use as selection criteria? Time (which we know it cannot 
be used because it's not time-triggered)? Or what would be your criteria there?

> The script (if you refer to it how I describe it) still has the caveat of 
> running all downstream DAGs

Same as current time-range backfill. If your time-range Dag is backfilled, it 
should (I believe) also generate asset events if they produce assets. Unless 
you are talking about "asset-downstream Dags, not the Dag to backfill 
-downstream Dags".

>  It's a solution, but not really the most flexible IMO. If the POST 
> /api/v2/dags/:dag_id/assets/queuedEvents was available, here indeed a script 
> could do anything.
> If your Asset has several downstream DAGs, you'll run them all, while you may 
> only want to backfill one.

I am not sure - but if you do not want to reprocess "everything" that asset 
generates possibly what you want to do is "clear" all the tasks in specific the 
DagRuns rather than backfill them. 

I guess you want to have something that will allow you to clear (and 
effectively re-run) all the tasks for a set of dag_runs. 

In which case you could simply clear all the taks in the DagRun - which is what 
https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#operation/clear_dag_run
 does - and then you go back to the "how do I select the dag_runs to clear", 
which I (again) think is way better to have script to do so -  rather than come 
with a "backfill UI" modification - because you would have to somehow would 
have to specify "backfill those particular dagruns" - with some selection 
criteria



GitHub link: 
https://github.com/apache/airflow/discussions/59886#discussioncomment-15374612

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to