首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用sqoop从配置单元分区表mysql表中导出数据

无法使用sqoop从配置单元分区表mysql表中导出数据
EN

Stack Overflow用户
提问于 2016-12-17 12:53:42
回答 1查看 398关注 0票数 1

我在POC上工作,我们需要从MySQL DB获得数据到蜂窝分区表,然后需要将数据转移到表,这是MySQL Db。我已经创建了支持acid属性的表,并按年和月进行分区。因此,目前我无法将数据传输到MySQL DB。那么,有人能建议我如何实现这一点吗?

EN

回答 1

Stack Overflow用户

发布于 2016-12-17 14:59:03

您可以通过以下方式使用Sqoop import将表数据传输到hive:

代码语言:javascript
复制
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。

代码语言:javascript
复制
$ sqoop export \
--connect <connect string>\
--username \
-P
--table <hive table>\ 
--export-dir <location
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41195494

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档