hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Perepelytsya (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-138) Provide option to export a HEADER
Date Thu, 16 Aug 2012 17:11:38 GMT

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

Andrew Perepelytsya commented on HIVE-138:
------------------------------------------

Adam, it doesn't look like 'with header' syntax was implemented as described originally, but
I checked the patch diff and setting this option did work for me in 0.7.x:
{code}set hive.cli.print.header=true;{code}
                
> Provide option to export a HEADER
> ---------------------------------
>
>                 Key: HIVE-138
>                 URL: https://issues.apache.org/jira/browse/HIVE-138
>             Project: Hive
>          Issue Type: Improvement
>          Components: Clients, Query Processor
>            Reporter: Adam Kramer
>            Assignee: Paul Butler
>            Priority: Minor
>             Fix For: 0.7.0
>
>         Attachments: HIVE-138.patch
>
>
>     When writing data to directories or files for later analysis, or when exploring data
in the hive CLI with raw SELECT statements, it'd be great if we could get a "header" or something
so we know which columns our output comes from. Any chance this is easy to add? Just print
the column names (or formula used to generate them) in the first row?
> SELECT foo.* WITH HEADER FROM some_table foo limit 3;
> col1    col2    col3
> 1   9   6
> 7   5   0
> 7   5   3
> SELECT f.col1-f.col2, col3 WITH HEADER FROM some_table foo limit 3;
> f.col1-f.col2     col3
> -8     6
> 2     0
> 2     3
> ...etc

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message