Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
# specific language governing permissions and limitations
# under the License.
"""
Example DAG demonstrating the usage of BranchDayOfWeekOperator.
### BranchDayOfWeekOperator

This example demonstrates how to use the BranchDayOfWeekOperator to choose downstream tasks based on the day
of the week. It shows both a single-day branch and a weekend branch using the WeekDay enum.
"""

from __future__ import annotations
Expand All @@ -34,6 +37,7 @@
catchup=False,
tags=["example"],
schedule="@daily",
doc_md=__doc__,
) as dag:
# [START howto_operator_day_of_week_branch]
empty_task_1 = EmptyOperator(task_id="branch_true")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
"""Example DAG demonstrating the usage of the ShortCircuitOperator."""
"""
### ShortCircuitOperator

This example demonstrates how to use the ShortCircuitOperator to continue a workflow only when a condition
is truthy. It also shows how `ignore_downstream_trigger_rules=False` lets later downstream tasks respect
their trigger rules after the direct downstream tasks are skipped.
"""

from __future__ import annotations

Expand All @@ -32,6 +38,7 @@
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
catchup=False,
tags=["example"],
doc_md=__doc__,
) as dag:
# [START howto_operator_short_circuit]
cond_true = ShortCircuitOperator(
Expand Down
Loading