You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Tomasz Żukowski (Jira)" <ji...@apache.org> on 2019/11/17 14:57:00 UTC

[jira] [Assigned] (AIRFLOW-4824) MySqlHook needs to override DbApiHook.get_uri to pull in extra for charset=utf-8 during create_engine

     [ https://issues.apache.org/jira/browse/AIRFLOW-4824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tomasz Żukowski reassigned AIRFLOW-4824:
----------------------------------------

    Assignee: Tomasz Żukowski

> 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: lolcode
>            Assignee: Tomasz Żukowski
>            Priority: Minor
>
> 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
(v8.3.4#803005)