I got
No module named 'MySQLdb'
when importing ariflow
from airflow.hooks.mysql_hook import MySqlHook
I'm using Mac, python 3.7.6
Installed
Beside this specific issue, we have a server installed airflow and I was tring to test some airflow components (hooks etc) without full airflow environment, is that feasible?
Thanks!
You are not using the updated MySqlHook
.
For Airflow <2.0
you will need to install backport providers :
pip install apache-airflow-backport-providers-mysql
For Airflow >=2.0
you will need to install providers:
pip install apache-airflow-providers-mysql
then you can import the hook via:
from airflow.providers.mysql.hooks.mysql import MySqlHook
As for your second question i'm not sure what you mean by full airflow environment. The providers for example were removed from Airflow core to separated packages.
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