I can't seem to be able to import Mysql.
like trying to import using this
from airflow.operators.mysql_operator import MySqlOperator
I get this error
"Cannot find reference 'MySqlOperator' in 'mysql_operator.py' "
1 Answer
Assuming you are on version 2.0.0 or greater, the import would be:
from airflow.providers.mysql.operators.mysql import MySqlOperator
Remember to install the MySQL providers package first:
pip install 'apache-airflow-providers-mysql'
Here is an example from the docs.
1 Comment
Jarek Potiuk
And If you are not on Airflow 2+ better upgrade NOW. Airflow 1.10 reached end-of-life in June 17th 2021 and it will no longer receive even critical security fixes. You can watch the discussion panel "Keep your airflow secure" from "just running" Airflow Summit 2021 crowdcast.io/e/airflowsummit2021/3 where we discussed it at length.