[
https://issues.apache.org/jira/browse/AIRFLOW-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aizhamal Nurmamat kyzy updated AIRFLOW-3633:
--------------------------------------------
Component/s: (was: hive_hooks)
Removing hive_hooks from components 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: 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)