一种将结果从 Pig 导出到数据库的方法 [英] A way to export the results from Pig to a database
本文介绍了一种将结果从 Pig 导出到数据库的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法把Pig的结果直接导出到mysql这样的数据库?
Is there a way to export the results from Pig directly to a database like mysql?
推荐答案
在记住 orangeoctopus 所说的(当心 DDOS...)的同时,你有没有看看 DBStorage?
While keeping in mind what orangeoctopus said (beware of DDOS...) have you had a look to DBStorage?
data = LOAD '...' AS (...);
...
STORE data INTO DBStorage('com.mysql.jdbc.Driver', 'dbc:mysql://host/db', 'INSERT ...');
这篇关于一种将结果从 Pig 导出到数据库的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文