使用sqoop从oracle导入数据

问题描述:

我正在使用以下命令将表导入从oracle使用sqoop的hadoop。但我得到错误。因为我在hadoop noob,我不知道如何解决它。使用sqoop从oracle导入数据

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

是的。sqoop特定命令应该在它之前有('--')。 –

+0

谢谢。我很无聊,我没有添加 - 在详细之前。 –

您不应该在表格选择中指定数据库。由于数据库TABS在连接字符串已经选定,

更换,

--table tabs.user_info 

--table user_info 

让我知道这对你的作品。

+0

选项卡是模式名称。这是TABS数据库的主要模式。现在我已经改变了你的建议,但得到同样的错误。 –

+0

错误上面有什么错误? –

+0

是的完全一样。 –