0

When attempting invoking from luigi.contrib.mysqldb import MySqlTarget I get the warning:

I get the error: Loading MySQL module without the python package mysql-connector-python.         
This will crash at runtime if MySQL functionality is used.

I don't have mysql downloaded for my python installation, and neither can I, because pip install mysql throws a ConfigParser related error. According to this thread mysql is not compatible with python 3 but there is a forked version called mysqlclient. I have this package, but MySqlTarget looks like it's written for version 2.

Would the recommended approach here be to fork my own version for pymysql, or has somebody already worked on this?

The goal is to create a table locally and then updated a MySQL table within a luigi.Task.

aaron
  • 6,339
  • 12
  • 54
  • 80
  • Have you tried installing `mysql-connector-python`? I had the same warning and after installing it through pip (`pip3 install mysql-connector-python`) it works. – Bernard Jan 16 '18 at 14:07
  • @Bernard I hadn't tried that, no, thanks for the tip. I actually switched to airflow after running into this limitation and haven't looked back. Have you tried it out yet? – aaron Jan 18 '18 at 01:07
  • It works with MySqlTarget, however now use SQLAlchemyTarget to support other RDBMS. I had a quick look at Airflow, but not really used it. – Bernard Jan 18 '18 at 13:56

0 Answers0