csv to hive table

52 views
Skip to first unread message

kumar vaibhav

unread,
Mar 30, 2013, 10:41:23 AM3/30/13
to chenn...@googlegroups.com
Is there a way in which hive can infer the schema and make it dynamically given a csv file? I did not find this anywhere. It seems that the corresponding hive table should exist beforehand.

But then how does the Hue interface is able to do it? It provides the mechanism for making table from uploaded file.

Any idea? I am not stuck due to this but just curious.

Thanks,
Vaibhav

Ashwanth Kumar

unread,
Mar 30, 2013, 10:56:52 AM3/30/13
to chenn...@googlegroups.com
Hey Kumar,

On Sat, Mar 30, 2013 at 8:11 PM, kumar vaibhav <vaibhav...@gmail.com> wrote:
Is there a way in which hive can infer the schema and make it dynamically given a csv file? I did not find this anywhere. It seems that the corresponding hive table should exist beforehand.

I don't think it is a native feature of Hive. 
 

But then how does the Hue interface is able to do it? It provides the mechanism for making table from uploaded file.

One of the beautiful things about OSS is you can look under the hood and see how is she built up ;) 


(From line 100) you can read the python that analysis the uploaded file and identify the field and their types. Also, they have documented the limitations of that approach. 
 

Any idea? I am not stuck due to this but just curious.

HTH
 

Thanks,
Vaibhav

--
You received this message because you are subscribed to the Google Groups "Hadoop User Group (HUG) Chennai" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chennaihug+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Ashwanth Kumar / ashwanthkumar.in

kumar vaibhav

unread,
Mar 30, 2013, 11:19:30 AM3/30/13
to chenn...@googlegroups.com, ashwan...@googlemail.com
Wow! Awesome Ashwanth!

Thanks a lot!
Reply all
Reply to author
Forward
0 new messages