我希望将mysql中的多个表的数据加载到hdfs中,这些表的名称类似于a__0、a__1、a__2。
如何使用Sqoop将这些表加载到hdfs中?
我能用UNION吗?
发布于 2016-07-07 13:38:02
你有很多方法可以做到这一点。
--exclude-tables <tables> --逗号分隔的值)从impor-all-tables中排除某些表。现在运行shell脚本: sqoop命令将按照逻辑运行6次,并导入6个表。
$ ./importAll.sh
importing table a_0_0
importing table a_0_1
importing table a_0_2
importing table a_0_3
importing table a_0_4
importing table a_0_5注意:您必须根据需要修改shell脚本中的逻辑。我提出的解决办法是基于所提供的细节。
https://stackoverflow.com/questions/38245695
复制相似问题