Support Questions

Find answers, ask questions, and share your expertise

How to loop trough data in Hive?

avatar
New Contributor

Hi,

 

I would like to loop through data inside my Hive tables, ¿which is the best tool in order to do that?

 

I have been searching and I do not find the answer.

 

Thanks!

2 REPLIES 2

avatar
Super Guru
Have you explored Hive JDBC driver ,which you can connect from Java code, query Hive tables and loop through data.

Official site:
https://www.cloudera.com/downloads/connectors/hive/jdbc/2-6-1.html

Doc:
http://www.cloudera.com/documentation/other/connectors/hive-jdbc/latest/Cloudera-JDBC-Driver-for-Apa...

Hope helps.

avatar
Super Guru
I think I understand you better from your another post:

http://community.cloudera.com/t5/Batch-SQL-Apache-Hive/Something-similar-to-PL-HQL-available-on-Clou...

Currently Hive does not support loop, so you might have to do it at application level.