Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Airflow - Chart Query failing

Tags:

airflow

I am new to Airflow and I am trying to create charts for my DAG but I keep getting the following error:

SQL execution failed. Details: 'NoneType' object has no attribute 'get_pandas_df'

My query looks like:

SELECT dag_id, execution_date, count(*) as ccount FROM task_instance GROUP BY dag_id, execution_date
like image 497
KronnorK Avatar asked Jun 23 '16 10:06

KronnorK


People also ask

What is depends on past in airflow?

According to the official Airflow docs, The task instances directly upstream from the task need to be in a success state. Also, if you have set depends_on_past=True, the previous task instance needs to have succeeded (except if it is the first run for that task).

What is airflow DB?

Database URI Airflow uses SQLAlchemy to connect to the database, which requires you to configure the Database URL. You can do this in option sql_alchemy_conn in section [database] . It is also common to configure this option with AIRFLOW__DATABASE__SQL_ALCHEMY_CONN environment variable.


1 Answers

In the web UI, if you click on the pen-shape edit button, you'll see the connection (Conn Id field) it uses is airflow_db, which means you need to make sure the aireflow_db connection (in the top menu Admin -> Connections) is configured to point to the database you set in the airflow.cfg file.

like image 140
Weiming Avatar answered Nov 08 '22 10:11

Weiming