Chapter 9. Aeronautical Charts and
Related Publications

Section 1. Types of Charts Available

Airflow Xcom Example < VALIDATED · 2025 >

from airflow import DAG from airflow.operators.python import PythonOperator from datetime import datetime def push_function(ti): # Pushing a specific key-value pair ti.xcom_push(key='model_accuracy', value=0.95) # Returning a value also pushes it to the 'return_value' key automatically return "Process Complete" def pull_function(ti): # Pulling from a specific task and key accuracy = ti.xcom_pull(task_ids='sender_task', key='model_accuracy') status = ti.xcom_pull(task_ids='sender_task', key='return_value') print(f"Model accuracy was accuracy with status: status") with DAG('xcom_traditional_example', start_date=datetime(2024, 1, 1), schedule=None) as dag: t1 = PythonOperator(task_id='sender_task', python_callable=push_function) t2 = PythonOperator(task_id='receiver_task', python_callable=pull_function) t1 >> t2 Use code with caution. Copied to clipboard

# Perform some logic result = pulled_value * 2 airflow xcom example

print(f"Generated Number: random_number") from airflow import DAG from airflow

user = context['ti'].xcom_pull(task_ids='task_a', key='user_id') airflow xcom example