Lee-W commented on code in PR #70303:
URL: https://github.com/apache/airflow/pull/70303#discussion_r3645199456
##########
airflow-core/docs/authoring-and-scheduling/timetable.rst:
##########
@@ -216,17 +221,18 @@ CronDataIntervalTimetable
^^^^^^^^^^^^^^^^^^^^^^^^^
A timetable that accepts a cron expression, creates data intervals according
to the interval between each cron
-trigger points, and triggers a Dag run at the end of each data interval.
+trigger points, and triggers a Dag run at the end of each data interval. You
can select it by providing a
+:class:`CronDataIntervalTimetable` to the ``schedule`` parameter of a Dag.
.. seealso:: `Differences between "trigger" and "data interval" timetables`_
.. seealso:: `Differences between the cron and delta data interval timetables`_
-Select this timetable by providing a valid cron expression as a string to the
``schedule``
-parameter of a Dag, as described in the :doc:`../core-concepts/dags`
documentation.
-
.. code-block:: python
- @dag(schedule="0 1 * * 3") # At 01:00 on Wednesday.
+ from airflow.sdk import CronDataIntervalTimetable
Review Comment:
```suggestion
from airflow.sdk import dag, CronDataIntervalTimetable
```
##########
airflow-core/docs/authoring-and-scheduling/timetable.rst:
##########
@@ -216,17 +221,18 @@ CronDataIntervalTimetable
^^^^^^^^^^^^^^^^^^^^^^^^^
A timetable that accepts a cron expression, creates data intervals according
to the interval between each cron
-trigger points, and triggers a Dag run at the end of each data interval.
+trigger points, and triggers a Dag run at the end of each data interval. You
can select it by providing a
+:class:`CronDataIntervalTimetable` to the ``schedule`` parameter of a Dag.
.. seealso:: `Differences between "trigger" and "data interval" timetables`_
.. seealso:: `Differences between the cron and delta data interval timetables`_
-Select this timetable by providing a valid cron expression as a string to the
``schedule``
-parameter of a Dag, as described in the :doc:`../core-concepts/dags`
documentation.
-
.. code-block:: python
- @dag(schedule="0 1 * * 3") # At 01:00 on Wednesday.
+ from airflow.sdk import CronDataIntervalTimetable
+
+
+ @dag(schedule=CronDataIntervalTimetable("0 1 * * 3")) # At 01:00 on
Wednesday.
Review Comment:
not sure why we need to change this. but i'm ok with it
##########
airflow-core/docs/authoring-and-scheduling/timetable.rst:
##########
@@ -206,7 +206,12 @@ arbitrary bounds, such as the start of day or of hour.
.. code-block:: python
- @dag(schedule=datetime.timedelta(minutes=30))
+ from datetime import timedelta
+
+ from airflow.sdk import DeltaDataIntervalTimetable
Review Comment:
```suggestion
from airflow.sdk import dag, DeltaDataIntervalTimetable
```
--
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]