You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Vijay <te...@gmail.com> on 2009/10/08 21:16:00 UTC

Questions about inserting Hive query results to external database such as MySQL

Is there any built-in support using Hive or any of the underlying output
format support to insert Hive query results directly into a mysql database?
For example if I want to directly load some aggregate results from a hive
query into a separate database. Sorry if this has been discussed elsewhere;
I couldn't find it easily.

Thanks,
Vijay

Re: Questions about inserting Hive query results to external database such as MySQL

Posted by Edward Capriolo <ed...@gmail.com>.
On Thu, Oct 8, 2009 at 3:16 PM, Vijay <te...@gmail.com> wrote:
> Is there any built-in support using Hive or any of the underlying output
> format support to insert Hive query results directly into a mysql database?
> For example if I want to directly load some aggregate results from a hive
> query into a separate database. Sorry if this has been discussed elsewhere;
> I couldn't find it easily.
>
> Thanks,
> Vijay
>

Vijay,

Check out. dboutputformat UDF. It is in the trunk contrib.
http://mail-archives.apache.org/mod_mbox/hadoop-hive-commits/200908.mbox/%3C20090831230334.264F523888A0@eris.apache.org%3E

It has some caveats but if it fits your need it is super easy. Someone
at Cloudera is also working on unsqoop hive->database.

Edward