airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "pralabhkumar (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AIRFLOW-1209) Hive Hook with beeline doesn't execute query if hql query doesn't have \n in the end
Date Tue, 16 May 2017 11:55:04 GMT
pralabhkumar created AIRFLOW-1209:
-------------------------------------

             Summary: Hive Hook with beeline doesn't execute query if hql query doesn't have
\n in the end
                 Key: AIRFLOW-1209
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1209
             Project: Apache Airflow
          Issue Type: Improvement
          Components: hive_hooks
    Affects Versions: Airflow 1.8
            Reporter: pralabhkumar


Airflow Hive operator doesn't run the query if the query doesn't end with \n . I am using
hive 1.2 beeline .  If I used just below query 
hql="select count(*) from test;"
in my HiveOpertor ,then the query doesn't run. Since beeline require \n at the end of the
file .

But can we make sure in hive_hooks.py ,we by default add \n ,and doesn't leave the same to
the user .

Code should change to 

hql = "USE {schema};\n{hql}\n".format(**locals())

instead of

hql = "USE {schema};\n{hql}".format(**locals())

Though this issue is fixed by beeline https://issues.apache.org/jira/browse/HIVE-10541 
in later version 

But for back word compatibility can we do the change in hive_hooks.py




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message