You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/07/11 10:58:00 UTC

[jira] [Commented] (AIRFLOW-1153) params in HiveOperator constructor can't be passed into Hive execution context

    [ https://issues.apache.org/jira/browse/AIRFLOW-1153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16882858#comment-16882858 ] 

ASF GitHub Bot commented on AIRFLOW-1153:
-----------------------------------------

ashb commented on pull request #2256: [AIRFLOW-1153] Fix issue ' params ' don't pass to HiveOperator execution context
URL: https://github.com/apache/airflow/pull/2256
 
 
   
 
----------------------------------------------------------------
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:
users@infra.apache.org


> params in HiveOperator constructor can't be passed into Hive execution context
> ------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-1153
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1153
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: hooks, operators
>    Affects Versions: 1.8.0, 2.0.0
>            Reporter: Xianping lin
>            Assignee: Fokko Driesprong
>            Priority: Critical
>              Labels: easyfix, hive, hive-hooks, newbie
>             Fix For: 2.0.0
>
>
> params parameter in HiveOperator can't be imported into Hive executation context.
>     so the following centence won't work, because 'mynumber' doesn't work for sql sentence.
>     test_hiveoperator = HiveOperator(
>         task_id='hive_test',
>         hiveconf_jinja_translate=True,
>         hql = ''' use myDB;
>             INSERT OVERWRITE TABLE t2
>             select * from t1 where t1.x > ' ${hiveconf:mynumber}'
>         ''',
>         params={'mynumber': 2},
>         dag=dag
>     )
>     this modification pass the 'params' in HiveOperator construction to Hive sql execution context.
>     The the variable definition can pass to hive sql



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)