You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pralabhkumar (JIRA)" <ji...@apache.org> on 2017/05/18 11:06:05 UTC

[jira] [Updated] (AIRFLOW-1209) Hive Hook with beeline doesn't execute query if hql query doesn't have \n in the end

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

pralabhkumar updated AIRFLOW-1209:
----------------------------------
    Affects Version/s: 1.9.0

> 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, 1.9.0
>            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)