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
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).
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With