You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Lola Slade (JIRA)" <ji...@apache.org> on 2019/06/20 14:41:00 UTC
[jira] [Created] (AIRFLOW-4824) MySqlHook needs to override
DbApiHook.get_uri to pull in extra for charset=utf-8 during create_engine
Lola Slade created AIRFLOW-4824:
-----------------------------------
Summary: MySqlHook needs to override DbApiHook.get_uri to pull in extra for charset=utf-8 during create_engine
Key: AIRFLOW-4824
URL: https://issues.apache.org/jira/browse/AIRFLOW-4824
Project: Apache Airflow
Issue Type: Bug
Components: hooks
Affects Versions: 1.10.3
Reporter: Lola Slade
When using the engine from a MySQLHook in other code (such as Pandas) the engine returned from the create_engine function is missing the charset=utf-8
This issue was reported here: [https://stackoverflow.com/questions/46084744/how-to-explicitly-declare-charset-utf8-for-airflow-connections]
{{{{conn = MySqlHook(mysql_conn_id='conn_id')
}}}}{{{{engine = conn.get_sqlalchemy_engine()}}}}
I can see that the code in function *get_uri* in dbapi_hook.py does not use the charset = utf8 information from the extra section and that mysql_hook.py does not override the function.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)