hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sirota, Peter" <sir...@amazon.com>
Subject RE: Hive Not Returning Column Names, even what not using 'When'??
Date Fri, 18 Feb 2011 00:53:43 GMT
Hi Mark,

You can use JDBC driver provided by Amazon Elastic MapReduce service.  When you use that driver
with SQL Squirrel it returns column names.  Here are the docs on how to get that driver:
http://buyitnw.appspot.com/docs.amazonwebservices.com/ElasticMapReduce/latest/DeveloperGuide/index.html?UsingEMR_Hive.html

Regards,
Peter Sirota



From: Sunderlin, Mark [mailto:mark.sunderlin@teamaol.com]
Sent: Thursday, February 17, 2011 1:00 PM
To: user@hive.apache.org
Subject: Hive Not Returning Column Names, even what not using 'When'??

When using either Hue or using Squirrel and jdbc, I get "_col0, _col1, _col2 ..." as my columns
names when querying my hive tables.

I see in https://issues.apache.org/jira/browse/HIVE-1346 that this is a known issue when using
the where clause, but I get in circumstances other than using a where clause.

This query, to return counts of rows of a log file that are of a certain log record type value,
 also returns generic column names:

select
sum(case cast(raw.log_type_id as int) when 1 then 1 else 0 end) type_1,
sum(case cast(raw.log_type_id as int) when 2 then 1 else 0 end) type_2,
sum(case cast(raw.log_type_id as int) when 6 then 1 else 0 end) type_6,
from raw_log raw

Is this a variation on the same issue, or a new issue, or it is something I am doing wrong?

---
Mark E. Sunderlin
Solutions Architect |AOL Data Warehouse
P: 703-256-6935 | C: 540-327-6222
AIM: MESunderlin
22000 AOL Way | Dulles, VA | 20166


Mime
View raw message