[ https://issues.apache.org/jira/browse/AIRFLOW-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15358054#comment-15358054 ]
ASF subversion and git services commented on AIRFLOW-100: --------------------------------------------------------- Commit efdbbb5d3beba49f9b633f0a25ce768f896c0a6a in incubator-airflow's branch refs/heads/master from jlowin [ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=efdbbb5 ] [AIRFLOW-100] Add execution_date_fn to ExternalTaskSensor Currently, ExternalTaskSensor only supports querying execution_dates that are either the same as the ExternalTaskSensor's execution_date or a fixed interval from that date (using `execution_delta`). This adds the ability to provide a fn (`execution_date_fn`) that accepts the current execution_date and can return any desired date for querying. This is much more flexible. For example, it could supply the last date of the previous month. > Add flexibility to ExternalTaskSensor > ------------------------------------- > > Key: AIRFLOW-100 > URL: https://issues.apache.org/jira/browse/AIRFLOW-100 > Project: Apache Airflow > Issue Type: Improvement > Components: operators > Reporter: Jeremiah Lowin > Assignee: Jeremiah Lowin > Priority: Minor > Labels: operator > > The ExternalTaskSensor defaults to sensing tasks with the same > {{execution_date}} as it does, and has an {{execution_delta}} parameter for > looking back farther in time. However, this doesn't support the case where > the sensing task has a smaller schedule_interval than the target task. > For example, if the ETS were run every hour, one couldn't use a fixed > {{execution_delta}} to sense a task that only ran daily (since each instance > of the ETS would need a different execution_delta). > However, a Daily task can wait for multiple hourly tasks, because it knows in > advance that it needs 24 ETS's with deltas == range(24). > Concrete suggestion: > - add a param ({{execution_delta_fn}}?) that takes in the current > execution_date and is expected to return the desired sense date (for example, > it could always return midnight of the previous day, no matter what the ETS > was executed). > cc [~criccomini] -- This message was sent by Atlassian JIRA (v6.3.4#6332)