我在POC上工作,我们需要从MySQL DB获得数据到蜂窝分区表,然后需要将数据转移到表,这是MySQL Db。我已经创建了支持acid属性的表,并按年和月进行分区。因此,目前我无法将数据传输到MySQL DB。那么,有人能建议我如何实现这一点吗?
发布于 2016-12-17 14:59:03
您可以通过以下方式使用Sqoop import将表数据传输到hive:
sqoop import --connect <connection string>
--username <>
-P
--table <table name>
--target-dir <location> <table name>
--fields-terminated-by ","
--hive-import
--create-hive-table
--hive-table <hive table name然后,您可以使用export代替import将数据导出回我的sql。
$ sqoop export \
--connect <connect string>\
--username \
-P
--table <hive table>\
--export-dir <locationhttps://stackoverflow.com/questions/41195494
复制相似问题