from airflow import DAG
from airflow.operators.python_operator import PythonOperator
from datetime import datetime
import pprint
dag = DAG (
dag_id = '4_python_operator_context',
start_date = datetime(2022, 12, 3),
schedule_interval = '* * * * *',
catchup = False,
tags = ['server_local', 'detail_test'],
description = 'Python Operator Sample',
default_args = {'owner': 'ParkGyeongTae'})
def func_print_context(**context):
return pprint.pprint(context)
def func_print_kwargs(**kwargs):
return pprint.pprint(kwargs)
task_print_context = PythonOperator(task_id = 'print_context', python_callable = func_print_context, dag = dag, do_xcom_push = False)
task_print_kwargs = PythonOperator(task_id = 'print_kwargs', python_callable = func_print_kwargs, dag = dag, do_xcom_push = False)
task_print_context >> task_print_kwargs
task_print_context
airflow-worker
*** Reading local file: /opt/airflow/logs/dag_id=4_python_operator_context/run_id=scheduled__2022-12-06T11:51:00+00:00/task_id=print_context/attempt=1.log
[2022-12-06, 20:52:01 KST] {taskinstance.py:1165} INFO - Dependencies all met for <TaskInstance: 4_python_operator_context.print_context scheduled__2022-12-06T11:51:00+00:00 [queued]>
[2022-12-06, 20:52:01 KST] {taskinstance.py:1165} INFO - Dependencies all met for <TaskInstance: 4_python_operator_context.print_context scheduled__2022-12-06T11:51:00+00:00 [queued]>
[2022-12-06, 20:52:01 KST] {taskinstance.py:1362} INFO -
--------------------------------------------------------------------------------
[2022-12-06, 20:52:01 KST] {taskinstance.py:1363} INFO - Starting attempt 1 of 1
[2022-12-06, 20:52:01 KST] {taskinstance.py:1364} INFO -
--------------------------------------------------------------------------------
[2022-12-06, 20:52:01 KST] {taskinstance.py:1383} INFO - Executing <Task(PythonOperator): print_context> on 2022-12-06 11:51:00+00:00
[2022-12-06, 20:52:01 KST] {standard_task_runner.py:54} INFO - Started process 354 to run task
[2022-12-06, 20:52:01 KST] {standard_task_runner.py:82} INFO - Running: ['***', 'tasks', 'run', '4_python_operator_context', 'print_context', 'scheduled__2022-12-06T11:51:00+00:00', '--job-id', '207', '--raw', '--subdir', 'DAGS_FOLDER/4_python_operator_context.py', '--cfg-path', '/tmp/tmph1l23h0w']
[2022-12-06, 20:52:01 KST] {standard_task_runner.py:83} INFO - Job 207: Subtask print_context
[2022-12-06, 20:52:01 KST] {dagbag.py:525} INFO - Filling up the DagBag from /opt/***/dags/4_python_operator_context.py
[2022-12-06, 20:52:01 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/configuration.py:545: DeprecationWarning: The sql_alchemy_conn option in [core] has been moved to the sql_alchemy_conn option in [database] - the old setting has been used, but please update your config.
option = self._get_environment_variables(deprecated_key, deprecated_section, key, section)
[2022-12-06, 20:52:01 KST] {task_command.py:384} INFO - Running <TaskInstance: 4_python_operator_context.print_context scheduled__2022-12-06T11:51:00+00:00 [running]> on host ***-worker
[2022-12-06, 20:52:01 KST] {taskinstance.py:1590} INFO - Exporting the following env vars:
AIRFLOW_CTX_DAG_OWNER=ParkGyeongTae
AIRFLOW_CTX_DAG_ID=4_python_operator_context
AIRFLOW_CTX_TASK_ID=print_context
AIRFLOW_CTX_EXECUTION_DATE=2022-12-06T11:51:00+00:00
AIRFLOW_CTX_TRY_NUMBER=1
AIRFLOW_CTX_DAG_RUN_ID=scheduled__2022-12-06T11:51:00+00:00
[2022-12-06, 20:52:01 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'execution_date' from the template is deprecated and will be removed in a future version. Please use 'data_interval_start' or 'logical_date' instead.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:01 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'next_ds' from the template is deprecated and will be removed in a future version. Please use '{{ data_interval_end | ds }}' instead.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:01 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'next_ds_nodash' from the template is deprecated and will be removed in a future version. Please use '{{ data_interval_end | ds_nodash }}' instead.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:01 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'next_execution_date' from the template is deprecated and will be removed in a future version. Please use 'data_interval_end' instead.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:01 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'prev_ds' from the template is deprecated and will be removed in a future version.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:01 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'prev_ds_nodash' from the template is deprecated and will be removed in a future version.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:01 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'prev_execution_date' from the template is deprecated and will be removed in a future version.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:01 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'prev_execution_date_success' from the template is deprecated and will be removed in a future version. Please use 'prev_data_interval_start_success' instead.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:01 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'tomorrow_ds' from the template is deprecated and will be removed in a future version.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:01 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'tomorrow_ds_nodash' from the template is deprecated and will be removed in a future version.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:01 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'yesterday_ds' from the template is deprecated and will be removed in a future version.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:01 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'yesterday_ds_nodash' from the template is deprecated and will be removed in a future version.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:01 KST] {logging_mixin.py:117} INFO - {'conf': <***.configuration.AirflowConfigParser object at 0x7f6384013760>,
'conn': None,
'dag': <DAG: 4_python_operator_context>,
'dag_run': <DagRun 4_python_operator_context @ 2022-12-06 11:51:00+00:00: scheduled__2022-12-06T11:51:00+00:00, state:running, queued_at: 2022-12-06 11:52:00.958168+00:00. externally triggered: False>,
'data_interval_end': DateTime(2022, 12, 6, 11, 52, 0, tzinfo=Timezone('UTC')),
'data_interval_start': DateTime(2022, 12, 6, 11, 51, 0, tzinfo=Timezone('UTC')),
'ds': '2022-12-06',
'ds_nodash': '20221206',
'execution_date': <Proxy at 0x7f63782f9cc0 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783725e0>, 'execution_date', DateTime(2022, 12, 6, 11, 51, 0, tzinfo=Timezone('UTC')))>,
'inlets': [],
'logical_date': DateTime(2022, 12, 6, 11, 51, 0, tzinfo=Timezone('UTC')),
'macros': <module '***.macros' from '/home/***/.local/lib/python3.8/site-packages/***/macros/__init__.py'>,
'next_ds': <Proxy at 0x7f63782f9f00 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783725e0>, 'next_ds', '2022-12-06')>,
'next_ds_nodash': <Proxy at 0x7f63782f9ec0 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783725e0>, 'next_ds_nodash', '20221206')>,
'next_execution_date': <Proxy at 0x7f63782f9f40 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783725e0>, 'next_execution_date', DateTime(2022, 12, 6, 11, 52, 0, tzinfo=Timezone('UTC')))>,
'outlets': [],
'params': {},
'prev_data_interval_end_success': DateTime(2022, 12, 6, 11, 51, 0, tzinfo=Timezone('UTC')),
'prev_data_interval_start_success': DateTime(2022, 12, 6, 11, 50, 0, tzinfo=Timezone('UTC')),
'prev_ds': <Proxy at 0x7f63782f9440 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783725e0>, 'prev_ds', '2022-12-06')>,
'prev_ds_nodash': <Proxy at 0x7f63782f9400 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783725e0>, 'prev_ds_nodash', '20221206')>,
'prev_execution_date': <Proxy at 0x7f6378304a00 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783725e0>, 'prev_execution_date', DateTime(2022, 12, 6, 11, 50, 0, tzinfo=Timezone('UTC')))>,
'prev_execution_date_success': <Proxy at 0x7f6378304580 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783725e0>, 'prev_execution_date_success', DateTime(2022, 12, 6, 11, 50, 0, tzinfo=Timezone('UTC')))>,
'prev_start_date_success': DateTime(2022, 12, 6, 11, 51, 0, 651865, tzinfo=Timezone('UTC')),
'run_id': 'scheduled__2022-12-06T11:51:00+00:00',
'task': <Task(PythonOperator): print_context>,
'task_instance': <TaskInstance: 4_python_operator_context.print_context scheduled__2022-12-06T11:51:00+00:00 [running]>,
'task_instance_key_str': '4_python_operator_context__print_context__20221206',
'templates_dict': None,
'test_mode': False,
'ti': <TaskInstance: 4_python_operator_context.print_context scheduled__2022-12-06T11:51:00+00:00 [running]>,
'tomorrow_ds': <Proxy at 0x7f6378304200 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783725e0>, 'tomorrow_ds', '2022-12-07')>,
'tomorrow_ds_nodash': <Proxy at 0x7f6378304900 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783725e0>, 'tomorrow_ds_nodash', '20221207')>,
'triggering_dataset_events': {},
'ts': '2022-12-06T11:51:00+00:00',
'ts_nodash': '20221206T115100',
'ts_nodash_with_tz': '20221206T115100+0000',
'var': {'json': None, 'value': None},
'yesterday_ds': <Proxy at 0x7f6378304600 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783725e0>, 'yesterday_ds', '2022-12-05')>,
'yesterday_ds_nodash': <Proxy at 0x7f6378304740 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783725e0>, 'yesterday_ds_nodash', '20221205')>}
[2022-12-06, 20:52:01 KST] {python.py:177} INFO - Done. Returned value was: None
[2022-12-06, 20:52:01 KST] {taskinstance.py:1401} INFO - Marking task as SUCCESS. dag_id=4_python_operator_context, task_id=print_context, execution_date=20221206T115100, start_date=20221206T115201, end_date=20221206T115201
[2022-12-06, 20:52:01 KST] {local_task_job.py:164} INFO - Task exited with return code 0
[2022-12-06, 20:52:01 KST] {local_task_job.py:273} INFO - 1 downstream tasks scheduled from follow-on schedule check
task_print_kwargs
airflow-worker
*** Reading local file: /opt/airflow/logs/dag_id=4_python_operator_context/run_id=scheduled__2022-12-06T11:51:00+00:00/task_id=print_kwargs/attempt=1.log
[2022-12-06, 20:52:03 KST] {taskinstance.py:1165} INFO - Dependencies all met for <TaskInstance: 4_python_operator_context.print_kwargs scheduled__2022-12-06T11:51:00+00:00 [queued]>
[2022-12-06, 20:52:03 KST] {taskinstance.py:1165} INFO - Dependencies all met for <TaskInstance: 4_python_operator_context.print_kwargs scheduled__2022-12-06T11:51:00+00:00 [queued]>
[2022-12-06, 20:52:03 KST] {taskinstance.py:1362} INFO -
--------------------------------------------------------------------------------
[2022-12-06, 20:52:03 KST] {taskinstance.py:1363} INFO - Starting attempt 1 of 1
[2022-12-06, 20:52:03 KST] {taskinstance.py:1364} INFO -
--------------------------------------------------------------------------------
[2022-12-06, 20:52:03 KST] {taskinstance.py:1383} INFO - Executing <Task(PythonOperator): print_kwargs> on 2022-12-06 11:51:00+00:00
[2022-12-06, 20:52:03 KST] {standard_task_runner.py:54} INFO - Started process 356 to run task
[2022-12-06, 20:52:03 KST] {standard_task_runner.py:82} INFO - Running: ['***', 'tasks', 'run', '4_python_operator_context', 'print_kwargs', 'scheduled__2022-12-06T11:51:00+00:00', '--job-id', '208', '--raw', '--subdir', 'DAGS_FOLDER/4_python_operator_context.py', '--cfg-path', '/tmp/tmpawdnsbll']
[2022-12-06, 20:52:03 KST] {standard_task_runner.py:83} INFO - Job 208: Subtask print_kwargs
[2022-12-06, 20:52:03 KST] {dagbag.py:525} INFO - Filling up the DagBag from /opt/***/dags/4_python_operator_context.py
[2022-12-06, 20:52:03 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/configuration.py:545: DeprecationWarning: The sql_alchemy_conn option in [core] has been moved to the sql_alchemy_conn option in [database] - the old setting has been used, but please update your config.
option = self._get_environment_variables(deprecated_key, deprecated_section, key, section)
[2022-12-06, 20:52:03 KST] {task_command.py:384} INFO - Running <TaskInstance: 4_python_operator_context.print_kwargs scheduled__2022-12-06T11:51:00+00:00 [running]> on host ***-worker
[2022-12-06, 20:52:03 KST] {taskinstance.py:1590} INFO - Exporting the following env vars:
AIRFLOW_CTX_DAG_OWNER=ParkGyeongTae
AIRFLOW_CTX_DAG_ID=4_python_operator_context
AIRFLOW_CTX_TASK_ID=print_kwargs
AIRFLOW_CTX_EXECUTION_DATE=2022-12-06T11:51:00+00:00
AIRFLOW_CTX_TRY_NUMBER=1
AIRFLOW_CTX_DAG_RUN_ID=scheduled__2022-12-06T11:51:00+00:00
[2022-12-06, 20:52:03 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'execution_date' from the template is deprecated and will be removed in a future version. Please use 'data_interval_start' or 'logical_date' instead.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:03 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'next_ds' from the template is deprecated and will be removed in a future version. Please use '{{ data_interval_end | ds }}' instead.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:03 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'next_ds_nodash' from the template is deprecated and will be removed in a future version. Please use '{{ data_interval_end | ds_nodash }}' instead.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:03 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'next_execution_date' from the template is deprecated and will be removed in a future version. Please use 'data_interval_end' instead.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:03 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'prev_ds' from the template is deprecated and will be removed in a future version.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:03 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'prev_ds_nodash' from the template is deprecated and will be removed in a future version.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:03 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'prev_execution_date' from the template is deprecated and will be removed in a future version.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:03 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'prev_execution_date_success' from the template is deprecated and will be removed in a future version. Please use 'prev_data_interval_start_success' instead.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:03 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'tomorrow_ds' from the template is deprecated and will be removed in a future version.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:03 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'tomorrow_ds_nodash' from the template is deprecated and will be removed in a future version.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:03 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'yesterday_ds' from the template is deprecated and will be removed in a future version.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:03 KST] {warnings.py:109} WARNING - /home/***/.local/lib/python3.8/site-packages/***/utils/context.py:297: AirflowContextDeprecationWarning: Accessing 'yesterday_ds_nodash' from the template is deprecated and will be removed in a future version.
warnings.warn(_create_deprecation_warning(k, replacements))
[2022-12-06, 20:52:03 KST] {logging_mixin.py:117} INFO - {'conf': <***.configuration.AirflowConfigParser object at 0x7f6384013760>,
'conn': None,
'dag': <DAG: 4_python_operator_context>,
'dag_run': <DagRun 4_python_operator_context @ 2022-12-06 11:51:00+00:00: scheduled__2022-12-06T11:51:00+00:00, state:running, queued_at: 2022-12-06 11:52:00.958168+00:00. externally triggered: False>,
'data_interval_end': DateTime(2022, 12, 6, 11, 52, 0, tzinfo=Timezone('UTC')),
'data_interval_start': DateTime(2022, 12, 6, 11, 51, 0, tzinfo=Timezone('UTC')),
'ds': '2022-12-06',
'ds_nodash': '20221206',
'execution_date': <Proxy at 0x7f63782fafc0 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783735e0>, 'execution_date', DateTime(2022, 12, 6, 11, 51, 0, tzinfo=Timezone('UTC')))>,
'inlets': [],
'logical_date': DateTime(2022, 12, 6, 11, 51, 0, tzinfo=Timezone('UTC')),
'macros': <module '***.macros' from '/home/***/.local/lib/python3.8/site-packages/***/macros/__init__.py'>,
'next_ds': <Proxy at 0x7f63782fae40 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783735e0>, 'next_ds', '2022-12-06')>,
'next_ds_nodash': <Proxy at 0x7f63782faec0 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783735e0>, 'next_ds_nodash', '20221206')>,
'next_execution_date': <Proxy at 0x7f63782faf80 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783735e0>, 'next_execution_date', DateTime(2022, 12, 6, 11, 52, 0, tzinfo=Timezone('UTC')))>,
'outlets': [],
'params': {},
'prev_data_interval_end_success': DateTime(2022, 12, 6, 11, 51, 0, tzinfo=Timezone('UTC')),
'prev_data_interval_start_success': DateTime(2022, 12, 6, 11, 50, 0, tzinfo=Timezone('UTC')),
'prev_ds': <Proxy at 0x7f63782fa3c0 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783735e0>, 'prev_ds', '2022-12-06')>,
'prev_ds_nodash': <Proxy at 0x7f63782fa380 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783735e0>, 'prev_ds_nodash', '20221206')>,
'prev_execution_date': <Proxy at 0x7f63783dfd00 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783735e0>, 'prev_execution_date', DateTime(2022, 12, 6, 11, 50, 0, tzinfo=Timezone('UTC')))>,
'prev_execution_date_success': <Proxy at 0x7f6378305880 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783735e0>, 'prev_execution_date_success', DateTime(2022, 12, 6, 11, 50, 0, tzinfo=Timezone('UTC')))>,
'prev_start_date_success': DateTime(2022, 12, 6, 11, 51, 0, 651865, tzinfo=Timezone('UTC')),
'run_id': 'scheduled__2022-12-06T11:51:00+00:00',
'task': <Task(PythonOperator): print_kwargs>,
'task_instance': <TaskInstance: 4_python_operator_context.print_kwargs scheduled__2022-12-06T11:51:00+00:00 [running]>,
'task_instance_key_str': '4_python_operator_context__print_kwargs__20221206',
'templates_dict': None,
'test_mode': False,
'ti': <TaskInstance: 4_python_operator_context.print_kwargs scheduled__2022-12-06T11:51:00+00:00 [running]>,
'tomorrow_ds': <Proxy at 0x7f6378305680 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783735e0>, 'tomorrow_ds', '2022-12-07')>,
'tomorrow_ds_nodash': <Proxy at 0x7f63783055c0 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783735e0>, 'tomorrow_ds_nodash', '20221207')>,
'triggering_dataset_events': {},
'ts': '2022-12-06T11:51:00+00:00',
'ts_nodash': '20221206T115100',
'ts_nodash_with_tz': '20221206T115100+0000',
'var': {'json': None, 'value': None},
'yesterday_ds': <Proxy at 0x7f6378305580 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783735e0>, 'yesterday_ds', '2022-12-05')>,
'yesterday_ds_nodash': <Proxy at 0x7f63783056c0 with factory functools.partial(<function lazy_mapping_from_context.<locals>._deprecated_proxy_factory at 0x7f63783735e0>, 'yesterday_ds_nodash', '20221205')>}
[2022-12-06, 20:52:03 KST] {python.py:177} INFO - Done. Returned value was: None
[2022-12-06, 20:52:03 KST] {taskinstance.py:1401} INFO - Marking task as SUCCESS. dag_id=4_python_operator_context, task_id=print_kwargs, execution_date=20221206T115100, start_date=20221206T115203, end_date=20221206T115203
[2022-12-06, 20:52:04 KST] {local_task_job.py:164} INFO - Task exited with return code 0
[2022-12-06, 20:52:04 KST] {local_task_job.py:273} INFO - 0 downstream tasks scheduled from follow-on schedule check
'Data Engineering > Airflow' 카테고리의 다른 글
[Airflow] airflow db reset을 하면 scheduler가 죽는다.. (0) | 2022.12.06 |
---|---|
[Airflow] airflow db init (0) | 2022.12.06 |
[Airflow] context를 이용한 xcom에 key, value 남기는 방법 (0) | 2022.12.06 |
[Airflow] Xcom에 데이터 남기지 않는 방법 (0) | 2022.12.06 |
[Airflow] PythonOperator에서 return값은 로그에 남는다. (0) | 2022.12.06 |