teamclairvoyant/airflow-maintenance-dags

Query error in airflow db cleanup (DagRunModel)

Closed this issue · 0 comments

Error in cleanup_DagRun Task of DAG airflow-db-cleanup
Airflow Version: 1.10.9 (Kubernetes Executor)
`LINE 6: WHERE dag_run.external_trigger = 0 GROUP BY dag_run.dag_id) ...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.

[SQL: SELECT dag_run.id AS dag_run_id, dag_run.execution_date AS dag_run_execution_date
FROM dag_run
WHERE dag_run.execution_date NOT IN (SELECT anon_1.max_1 AS anon_1_max_1
FROM (SELECT max(dag_run.execution_date) AS max_1
FROM dag_run
WHERE dag_run.external_trigger = %(external_trigger_1)s GROUP BY dag_run.dag_id) AS anon_1) AND dag_run.execution_date <= %(execution_date_1)s]`