Link to home
Start Free TrialLog in
Avatar of toooki
toooki

asked on

Hive query question

I have a table in hive:
table1
f1  f2
x   10
y 20
p 40
q 55

How can I query the above table in hive to obtain one record like the following:
x:10, y:20, p:40, q:55

Thank you.
Avatar of aikimark
aikimark
Flag of United States of America image

Are you talking about the Windows registry hive or some other database?

What language are you using?
Avatar of toooki
toooki

ASKER

I am using Apache Hive.
In looking at the Hive language manual it uses fairly standard SQL

SELECT * FROM sales WHERE amount > 10 AND region = "US"

Link to the language manual
https://cwiki.apache.org/confluence/display/Hive/LanguageManual

mlmcc
My guess would be some combination of ClusterBy and Transform, however, I have no way to test this.
ASKER CERTIFIED SOLUTION
Avatar of Sharath S
Sharath S
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial