我使用下面的命令使用sqoop从oracle导入表到hadoop。但我得到错误。因为我是hadoop的noob,我不知道如何解决它。
sqoop import --connect "jdbc:oracle:thin:@172.16.10.112:1523:TABS" --username testuser1 --password testuser1 --table tabs.user_info --target-dir /tmp –verbose
Generic Hadoop command-line arguments:
(must preceed any tool-specific arguments)
Generic options supported are
-conf <configuration file> specify an application configuration file
-D <property=value> use value for given property
-fs <local|namenode:port> specify a namenode
-jt <local|resourcemanager:port> specify a ResourceManager
-files <comma separated list of files> specify comma separated files to be copied to the map reduce cluster
-libjars <comma separated list of jars> specify comma separated jar files to include in the classpath.
-archives <comma separated list of archives> specify comma separated archives to be unarchived on the compute machines.
The general command line syntax is
bin/hadoop command [genericOptions] [commandOptions]
At minimum, you must specify --connect and --table
Arguments to mysqldump and other subprograms may be supplied
after a '--' on the command line.
答案 0 :(得分:1)
详细信息中的短划线( - )是不同的
答案 1 :(得分:0)
您不应在表格选择中指定数据库。因为已在连接字符串中选择了数据库TABS
,
替换,
--table tabs.user_info
与
--table user_info
请告诉我这是否适合您。