hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frederick Oko <frederick....@gmail.com>
Subject Re: Classpath question with testcase and UDF
Date Sun, 19 Jul 2009 00:04:29 GMT
DBOutputFormat is transactional per reducer (bulk at reducer close) so
granted to prevent the case of polluting your external DB w/ incomplete
results you would have to use it in queries that would take a single
reducer.

On Jul 16, 2009 7:12 PM, "Edward Capriolo" <edlinuxguru@gmail.com> wrote:

Zheng,

Thanks for the tips. I used your suggestions.
https://issues.apache.org/jira/browse/HIVE-645.

Zheng we are only outputting one query per row. The usage is to dump a
table:

people
id name
1  Ed
2  Zheng

from people
select dboutput('jdbc:mysql', 'user','password', 'INSERT INTO people
(id,name) VALUES (?,?)', id, name);

@Frederick. There is no transaction here since we are making a
connection per row. A huge transactional dump would be tricky. Is
DBOutputFormat transactional.

The UDF returns 0 for success 1 for failure so you can do the status like:

from people
select id, dboutput('jdbc:mysql', 'user','password', 'INSERT INTO
people (id,name) VALUES (?,?)', id, name);
1,0
2,0

Edward

On Thu, Jul 16, 2009 at 8:23 PM, Zheng Shao<zshao9@gmail.com> wrote: > Hi
Edward, > > We currently d...

Mime
View raw message