uranusjr commented on code in PR #25410:
URL: https://github.com/apache/airflow/pull/25410#discussion_r940943267
##########
docs/apache-airflow/concepts/timetable.rst:
##########
@@ -19,16 +19,18 @@
Timetables
==========
-A DAG's scheduling strategy is determined by its internal "timetable". This
-timetable can be created by specifying the DAG's ``schedule_interval``
argument,
-as described in :doc:`DAG Run </dag-run>`, or by passing a ``timetable``
argument
-directly. The timetable also dictates the data interval and the logical time
of each
-run created for the DAG.
+For dags with time-based schedules (as opposed to event-driven), the scheduling
Review Comment:
```suggestion
For DAGs with time-based schedules (as opposed to event-driven), the
scheduling
```
##########
docs/apache-airflow/concepts/datasets.rst:
##########
@@ -37,11 +37,11 @@ Then reference the dataset as a task outlet:
:start-after: [START task_outlet]
:end-before: [END task_outlet]
-Finally, define a DAG and reference this dataset in the DAG's ``schedule_on``
parameter:
+Finally, define a DAG and reference this dataset in the DAG's ``schedule``
parameter:
.. exampleinclude:: /../../airflow/example_dags/example_datasets.py
:language: python
:start-after: [START dag_dep]
:end-before: [END dag_dep]
-You can reference multiple datasets in the DAG's ``schedule_on`` param. Once
there has been an update to all of the upstream datasets, the DAG will be
triggered. This means that the DAG will run as frequently as its
least-frequently-updated dataset.
+You can reference multiple datasets in the DAG's ``schedule`` param. Once
there has been an update to all of the upstream datasets, the DAG will be
triggered. This means that the DAG will run as frequently as its
least-frequently-updated dataset.
Review Comment:
```suggestion
You can reference multiple datasets in the DAG's ``schedule`` argument.
Once there has been an update to all of the upstream datasets, the DAG will be
triggered. This means that the DAG will run as frequently as its
least-frequently-updated dataset.
```
##########
docs/apache-airflow/concepts/timetable.rst:
##########
@@ -19,16 +19,18 @@
Timetables
==========
-A DAG's scheduling strategy is determined by its internal "timetable". This
-timetable can be created by specifying the DAG's ``schedule_interval``
argument,
-as described in :doc:`DAG Run </dag-run>`, or by passing a ``timetable``
argument
-directly. The timetable also dictates the data interval and the logical time
of each
-run created for the DAG.
+For dags with time-based schedules (as opposed to event-driven), the scheduling
+decisions are driven by its internal "timetable". The timetable class also
Review Comment:
```suggestion
decisions are driven by its internal "timetable". The timetable also
```
##########
docs/apache-airflow/concepts/timetable.rst:
##########
@@ -19,16 +19,18 @@
Timetables
==========
-A DAG's scheduling strategy is determined by its internal "timetable". This
-timetable can be created by specifying the DAG's ``schedule_interval``
argument,
-as described in :doc:`DAG Run </dag-run>`, or by passing a ``timetable``
argument
-directly. The timetable also dictates the data interval and the logical time
of each
-run created for the DAG.
+For dags with time-based schedules (as opposed to event-driven), the scheduling
+decisions are driven by its internal "timetable". The timetable class also
+determines the data interval and the logical date of each run created for the
DAG.
-Cron expressions and timedeltas are still supported (using
-`CronDataIntervalTimetable`_ and `DeltaDataIntervalTimetable`_ under the hood
-respectively), however, there are situations where they cannot properly express
-the schedule. Some examples are:
+Even for dags whose scheduling is defined by a cron expression or
``timedelta`` object,
+internally these expressions converted to a timetable.
Review Comment:
```suggestion
DAGs scheduled with a cron expression or ``timedelta`` object are
internally converted to always use a timetable.
```
##########
docs/apache-airflow/faq.rst:
##########
@@ -41,13 +41,13 @@ There are very many reasons why your task might not be
getting scheduled. Here a
"airflow" and "DAG" in order to prevent the DagBag parsing from importing
all python
files collocated with user's DAGs.
-- Is your ``start_date`` set properly? The Airflow scheduler triggers the
- task soon after the ``start_date + schedule_interval`` is passed.
+- Is your ``start_date`` set properly? For time-based dags, the task won't be
triggered until the
Review Comment:
```suggestion
- Is your ``start_date`` set properly? For time-based DAGs, the task won't
be triggered until the
```
##########
docs/apache-airflow/concepts/datasets.rst:
##########
@@ -37,11 +37,11 @@ Then reference the dataset as a task outlet:
:start-after: [START task_outlet]
:end-before: [END task_outlet]
-Finally, define a DAG and reference this dataset in the DAG's ``schedule_on``
parameter:
+Finally, define a DAG and reference this dataset in the DAG's ``schedule``
parameter:
Review Comment:
```suggestion
Finally, define a DAG and reference this dataset in the DAG's ``schedule``
argument:
```
##########
docs/apache-airflow/concepts/timetable.rst:
##########
@@ -19,16 +19,18 @@
Timetables
==========
-A DAG's scheduling strategy is determined by its internal "timetable". This
-timetable can be created by specifying the DAG's ``schedule_interval``
argument,
-as described in :doc:`DAG Run </dag-run>`, or by passing a ``timetable``
argument
-directly. The timetable also dictates the data interval and the logical time
of each
-run created for the DAG.
+For dags with time-based schedules (as opposed to event-driven), the scheduling
+decisions are driven by its internal "timetable". The timetable class also
+determines the data interval and the logical date of each run created for the
DAG.
-Cron expressions and timedeltas are still supported (using
-`CronDataIntervalTimetable`_ and `DeltaDataIntervalTimetable`_ under the hood
-respectively), however, there are situations where they cannot properly express
-the schedule. Some examples are:
+Even for dags whose scheduling is defined by a cron expression or
``timedelta`` object,
+internally these expressions converted to a timetable.
+
+If a cron expression or ``timedelta`` is sufficient for your use case, you
don't need
+to worry about timetables. But for more complicated scheduling requirements,
+you may create your own timetable class and pass that to the DAG ``schedule``
param.
Review Comment:
```suggestion
If a cron expression or ``timedelta`` is sufficient for your use case, you
don't need
to worry about timetables. But for more complicated scheduling requirements,
you may create your own timetable class and pass that to the DAG's
``schedule`` argument instead.
```
##########
docs/apache-airflow/dag-run.rst:
##########
@@ -117,8 +116,8 @@ DAG run fails.
Catchup
-------
-An Airflow DAG with a ``start_date``, possibly an ``end_date``, and a
``schedule_interval`` defines a
-series of intervals which the scheduler turns into individual DAG Runs and
executes. The scheduler, by default, will
+An Airflow DAG defined with a ``start_date``, possibly an ``end_date``, and
either a cron expression or timetable, defines a series of intervals which the
scheduler turns into individual DAG Runs and executes.
Review Comment:
```suggestion
An Airflow DAG defined with a ``start_date``, possibly an ``end_date``, and
a non-dataset schedule, defines a series of intervals which the scheduler turns
into individual DAG runs and executes.
```
##########
docs/apache-airflow/faq.rst:
##########
@@ -41,13 +41,13 @@ There are very many reasons why your task might not be
getting scheduled. Here a
"airflow" and "DAG" in order to prevent the DagBag parsing from importing
all python
files collocated with user's DAGs.
-- Is your ``start_date`` set properly? The Airflow scheduler triggers the
- task soon after the ``start_date + schedule_interval`` is passed.
+- Is your ``start_date`` set properly? For time-based dags, the task won't be
triggered until the
+ the first schedule interval following the start date has passed.
-- Is your ``schedule_interval`` set properly? The default ``schedule_interval``
- is one day (``datetime.timedelta(1)``). You must specify a different
``schedule_interval``
+- Is your ``schedule`` param set properly? The default
Review Comment:
```suggestion
- Is your ``schedule`` argument set properly? The default
```
##########
docs/apache-airflow/templates-ref.rst:
##########
@@ -89,16 +89,11 @@ existing code to use other variables instead.
Deprecated Variable Description
===================================== ====================================
``{{ execution_date }}`` the execution date (logical date),
same as ``dag_run.logical_date``
-``{{ next_execution_date }}`` the next execution date (if available)
(`pendulum.DateTime`_)
- if ``{{ execution_date }}`` is
``2018-01-01 00:00:00`` and
- ``schedule_interval`` is ``@weekly``,
``{{ next_execution_date }}``
- will be ``2018-01-08 00:00:00``
+``{{ next_execution_date }}`` the logical date of the next scheduled
run (if applicable)
+ You may be able to use
``data_interval_end`` instead.
Review Comment:
```suggestion
``{{ next_execution_date }}`` the logical date of the next
scheduled run (if applicable);
you may be able to use
``data_interval_end`` instead
```
##########
docs/apache-airflow/faq.rst:
##########
@@ -376,7 +376,7 @@ Why ``next_ds`` or ``prev_ds`` might not contain expected
values?
------------------------------------------------------------------
- When scheduling DAG, the ``next_ds`` ``next_ds_nodash`` ``prev_ds``
``prev_ds_nodash`` are calculated using
- ``execution_date`` and ``schedule_interval``. If you set
``schedule_interval`` as ``None`` or ``@once``,
+ ``logical_date`` and the dag's schedule interval (if applicable). If you set
``schedule`` as ``None`` or ``@once``,
Review Comment:
```suggestion
``logical_date`` and the DAG's schedule interval (if applicable). If you
set ``schedule`` as ``None`` or ``@once``,
```
##########
docs/apache-airflow/dag-run.rst:
##########
@@ -43,10 +43,9 @@ There are two possible terminal states for the DAG Run:
Cron Presets
''''''''''''
-Each DAG may or may not have a schedule, which informs how DAG Runs are
-created. ``schedule_interval`` is defined as a DAG argument, which can be
passed a
-`cron expression <https://en.wikipedia.org/wiki/Cron#CRON_expression>`_ as
-a ``str``, a ``datetime.timedelta`` object, or one of the following cron
"presets".
+You may set your DAG to run on a simple schedule by setting its ``schedule``
param with either a
+`cron expression <https://en.wikipedia.org/wiki/Cron#CRON_expression>`_, or a
``datetime.timedelta`` object,
+or one of the following cron "presets". For more elaborate scheduling
requirements, you can implement a :doc:`custom timetable </concepts/timetable>`
Review Comment:
```suggestion
You may set your DAG to run on a simple schedule by setting its ``schedule``
argument to either a
`cron expression <https://en.wikipedia.org/wiki/Cron#CRON_expression>`_, a
``datetime.timedelta`` object,
or one of the following cron "presets". For more elaborate scheduling
requirements, you can implement a :doc:`custom timetable </concepts/timetable>`
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]