You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Aizhamal Nurmamat kyzy (JIRA)" <ji...@apache.org> on 2019/05/17 20:29:03 UTC

[jira] [Updated] (AIRFLOW-3633) Allow more query types via HiverServer2Hook

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

Aizhamal Nurmamat kyzy updated AIRFLOW-3633:
--------------------------------------------
         Labels: hive hive-hooks  (was: )
    Component/s: hooks

Moving hive_hooks to hooks, adding hooks label for component refactor.

> Allow more query types via HiverServer2Hook
> -------------------------------------------
>
>                 Key: AIRFLOW-3633
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3633
>             Project: Apache Airflow
>          Issue Type: Wish
>          Components: hive_hooks, hooks
>    Affects Versions: 1.10.0
>            Reporter: Shubham Gupta
>            Priority: Trivial
>              Labels: hive, hive-hooks
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> It seems a bit unfair that  [HiveServer2Hook.get_records()|https://github.com/apache/airflow/blob/v1-10-stable/airflow/hooks/hive_hooks.py#L855] only allows SELECT (and WITH c.t.e.) queries as of [v1.10|https://github.com/apache/airflow/blob/v1-10-stable/airflow/hooks/hive_hooks.py#L787]
> While allowed queries have been [expanded|https://github.com/apache/airflow/blob/master/airflow/hooks/hive_hooks.py#L811] in master but it still isn't an exhaustive set.
>  
> My use-case involved DESCRIBE queries on tables and while I can use [headers|https://github.com/apache/airflow/blob/v1-10-stable/airflow/hooks/hive_hooks.py#L813] field from [get_results()|https://github.com/apache/airflow/blob/v1-10-stable/airflow/hooks/hive_hooks.py#L808] method, it isn't the same as some extra work is required to process the results from cursor description:
>  * Column names are prefixed with table name
>  * Data-types (strings) are not same as Hive
>  
> Is there a specific reason to support only limited set of queries (amongst those that return result)? If no, can we please have DESCRIBE queries too?



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