hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Venugopal Krishnan <>
Subject RE: Query
Date Tue, 23 Oct 2012 06:24:43 GMT
Hi Savant,

Thanks for your reply . we are trying this option also but we are using the below query from
the hive client which generates a text file on the cluster. Is it not possible to generate
the column headers in the text file ?  with the default query without using metadata of resultset.

insert overwrite directory '/user/hdev/temp'  select * from customer .


From: Savant, Keshav []
Sent: Tuesday, October 23, 2012 11:43 AM
To:; Venugopal Krishnan
Subject: RE: Query

Hi Krishnan,

To do this dynamically for any query....

Check if hive JDBC driver supports/provides the metadata for the result set, if yes then u
can get the metadata of resultset, get its column count, and then you can get column names,
types etc.

Kind regards,
rom: Venugopal Krishnan []<mailto:[]>
Sent: Tuesday, October 23, 2012 11:27 AM
Subject: Query


We have a requirement where we need to print the column headers in the generated file on executing
a query. We are using Jdbc hive client to execute the query.


The information contained in this message is proprietary and/or confidential. If you are not
the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose,
distribute or use the message in any manner; and (iii) notify the sender immediately. In addition,
please be aware that any message addressed to our domain is subject to archiving and review
by persons other than the intended recipient. Thank you.

View raw message