| Dependency | Reason |
|---|---|
| Task Instance State | Task is in the 'success' state which is not a valid state for execution. The task must be cleared in order to be run. |
| Dagrun Running | Task instance's dagrun was not in the 'running' state but in the state 'failed'. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | def getCEImplementationData(**context):
ti = context["ti"]
engine = get_dw_engine()
q_kpi7 = """
SELECT COALESCE(SUM(total_events), 0) AS v
FROM c5_health_check_report_ce_merged_metrics
WHERE metric = 'ce_not_yet_implemented'
AND label IN (
'3 - 6 months',
'6 - 9 months',
'9 - 12 months',
'12 - 24 months',
'> 24 months'
);
"""
q_kpi8 = """
SELECT COALESCE(SUM(total_events), 0) AS v
FROM c5_health_check_report_ce_merged_metrics
WHERE metric = 'ce_not_yet_implemented'
AND label IN (
'6 - 9 months',
'9 - 12 months',
'12 - 24 months',
'> 24 months'
);
"""
with engine.begin() as conn:
kpi7 = conn.execute(text(q_kpi7)).scalar() or 0
kpi8 = conn.execute(text(q_kpi8)).scalar() or 0
kpi7 = int(kpi7)
kpi8 = int(kpi8)
print(f"KPI 7 > 3 months: {kpi7}")
print(f"KPI 7 > 6 months: {kpi8}")
ti.xcom_push(key="kpi7", value=kpi7)
ti.xcom_push(key="kpi8", value=kpi8)
return {"kpi7": kpi7, "kpi8": kpi8}
|
| Attribute | Value |
|---|---|
| dag_id | nd201905_kpi |
| duration | 1.018658 |
| end_date | 2025-12-15 03:44:30.574230+00:00 |
| execution_date | 2025-12-15T03:42:22.542390+00:00 |
| executor_config | {} |
| generate_command | <function TaskInstance.generate_command at 0x7fb2f39d0320> |
| hostname | 406be32ba58f |
| is_premature | False |
| job_id | 3305 |
| key | ('nd201905_kpi', 'getCEImplementationData', <Pendulum [2025-12-15T03:42:22.542390+00:00]>, 2) |
| log | <Logger airflow.task (INFO)> |
| log_filepath | /usr/local/airflow/logs/nd201905_kpi/getCEImplementationData/2025-12-15T03:42:22.542390+00:00.log |
| log_url | http://localhost:8080/admin/airflow/log?execution_date=2025-12-15T03%3A42%3A22.542390%2B00%3A00&task_id=getCEImplementationData&dag_id=nd201905_kpi |
| logger | <Logger airflow.task (INFO)> |
| mark_success_url | http://localhost:8080/success?task_id=getCEImplementationData&dag_id=nd201905_kpi&execution_date=2025-12-15T03%3A42%3A22.542390%2B00%3A00&upstream=false&downstream=false |
| max_tries | 1 |
| metadata | MetaData(bind=None) |
| next_try_number | 2 |
| operator | PythonOperator |
| pid | 4088888 |
| pool | default_pool |
| prev_attempted_tries | 1 |
| previous_execution_date_success | 2025-12-14 15:00:00+00:00 |
| previous_start_date_success | 2025-12-15 07:03:01.917340+00:00 |
| previous_ti | <TaskInstance: nd201905_kpi.getCEImplementationData 2025-12-15 03:20:02.934720+00:00 [success]> |
| previous_ti_success | <TaskInstance: nd201905_kpi.getCEImplementationData 2025-12-14 15:00:00+00:00 [success]> |
| priority_weight | 2 |
| queue | default |
| queued_dttm | 2025-12-15 03:44:27.300189+00:00 |
| raw | False |
| run_as_user | None |
| start_date | 2025-12-15 03:44:29.555572+00:00 |
| state | success |
| task | <Task(PythonOperator): getCEImplementationData> |
| task_id | getCEImplementationData |
| test_mode | False |
| try_number | 2 |
| unixname | airflow |
| Attribute | Value |
|---|---|
| dag | <DAG: nd201905_kpi> |
| dag_id | nd201905_kpi |
| depends_on_past | False |
| deps | {<TIDep(Trigger Rule)>, <TIDep(Previous Dagrun State)>, <TIDep(Not In Retry Period)>} |
| do_xcom_push | True |
| downstream_list | [<Task(PythonOperator): getCNCEData>] |
| downstream_task_ids | {'getCNCEData'} |
| None | |
| email_on_failure | True |
| email_on_retry | True |
| end_date | None |
| execution_timeout | None |
| executor_config | {} |
| extra_links | [] |
| global_operator_extra_link_dict | {} |
| inlets | [] |
| lineage_data | None |
| log | <Logger airflow.task.operators (INFO)> |
| logger | <Logger airflow.task.operators (INFO)> |
| max_retry_delay | None |
| on_failure_callback | None |
| on_retry_callback | None |
| on_success_callback | None |
| op_args | [] |
| op_kwargs | {} |
| operator_extra_link_dict | {} |
| operator_extra_links | () |
| outlets | [] |
| owner | airflow |
| params | {} |
| pool | default_pool |
| priority_weight | 1 |
| priority_weight_total | 3 |
| provide_context | True |
| queue | default |
| resources | None |
| retries | 1 |
| retry_delay | 0:05:00 |
| retry_exponential_backoff | False |
| run_as_user | None |
| schedule_interval | 0 7,15 * * * |
| shallow_copy_attrs | ('python_callable', 'op_kwargs') |
| sla | None |
| start_date | 2023-01-17T00:00:00+00:00 |
| subdag | None |
| task_concurrency | None |
| task_id | getCEImplementationData |
| task_type | PythonOperator |
| template_ext | [] |
| template_fields | ('templates_dict', 'op_args', 'op_kwargs') |
| templates_dict | None |
| trigger_rule | all_success |
| ui_color | #ffefeb |
| ui_fgcolor | #000 |
| upstream_list | [<Task(PythonOperator): getRiskRegisterData>] |
| upstream_task_ids | {'getRiskRegisterData'} |
| wait_for_downstream | False |
| weight_rule | downstream |