airflow.example_dags.example_skip_dag

Example DAG demonstrating the EmptyOperator and a custom EmptySkipOperator which skips by default.

Module Contents

Classes

EmptySkipOperator

Empty operator which always skips the task.

Functions

create_test_pipeline(suffix, trigger_rule)

Instantiate a number of operators for the given DAG.

class airflow.example_dags.example_skip_dag.EmptySkipOperator(pre_execute=None, post_execute=None, on_execute_callback=None, on_failure_callback=None, on_success_callback=None, on_retry_callback=None, on_skipped_callback=None, **kwargs)[source]

Bases: airflow.models.baseoperator.BaseOperator

Empty operator which always skips the task.

ui_color = '#e8b7e4'[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

airflow.example_dags.example_skip_dag.create_test_pipeline(suffix, trigger_rule)[source]

Instantiate a number of operators for the given DAG.

Parameters
  • suffix (str) – Suffix to append to the operator task_ids

  • trigger_rule (str) – TriggerRule for the join task

  • dag (DAG) – The DAG to run the operators on

Was this entry helpful?