2016-11-08 104 views
0

我正在使用以下命令將表導入從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. 

回答

1

冗長的短劃線( - )不同

+0

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

+0

謝謝。我很無聊,我沒有添加 - 在詳細之前。 –

0

您不應該在表格選擇中指定數據庫。由於數據庫TABS在連接字符串已經選定,

更換,

--table tabs.user_info 

--table user_info 

讓我知道這對你的作品。

+0

選項卡是模式名稱。這是TABS數據庫的主要模式。現在我已經改變了你的建議,但得到同樣的錯誤。 –

+0

錯誤上面有什麼錯誤? –

+0

是的完全一樣。 –

相關問題