You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "zhongjiajie (JIRA)" <ji...@apache.org> on 2019/01/21 11:48:01 UTC

[jira] [Created] (AIRFLOW-3741) oracle_hook not support specific encoding

zhongjiajie created AIRFLOW-3741:
------------------------------------

             Summary: oracle_hook not support specific encoding
                 Key: AIRFLOW-3741
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3741
             Project: Apache Airflow
          Issue Type: New Feature
          Components: hooks
    Affects Versions: 1.10.1
            Reporter: zhongjiajie
            Assignee: zhongjiajie


oracle_hook get_conn block just like below

 
{code:java}
if dsn and sid and not service_name:
    dsn = cx_Oracle.makedsn(dsn, conn.port, sid)
    conn = cx_Oracle.connect(conn.login, conn.password, dsn=dsn)
elif dsn and service_name and not sid:
    dsn = cx_Oracle.makedsn(dsn, conn.port, service_name=service_name)
    conn = cx_Oracle.connect(conn.login, conn.password, dsn=dsn)
else:
    conn = cx_Oracle.connect(conn.login, conn.password, conn.host){code}
 

oracle_hook only support default encoding, not UTF-8.

In cx_oracle [official doc|https://cx-oracle.readthedocs.io/en/latest/module.html#cx_Oracle.connect] and [github issue|https://github.com/oracle/python-cx_Oracle/issues/157] we know how to set connection encoding. I think is necessary add this feature to oracle_hook



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)