[
https://issues.apache.org/jira/browse/AIRFLOW-4824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16996231#comment-16996231
]
ASF GitHub Bot commented on AIRFLOW-4824:
-----------------------------------------
potiuk commented on pull request #6816: [AIRFLOW-4824] Add charset handling for
SqlAlchemy engine for MySqlHook
URL: https://github.com/apache/airflow/pull/6816
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> 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)