使用sqoop从oracle导入数据
Importing data from oracle using sqoop
我正在使用以下命令使用 sqoop 从 Oracle 将 table 导入到 hadoop 中。但我收到错误。由于我是 hadoop 的菜鸟,我不知道如何修复它。
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.
您不应在 table 选择中指定数据库。因为数据库 TABS
已经在连接字符串中被选中,
替换,
--table tabs.user_info
和
--table user_info
让我知道这是否适合你。
verbose 中的破折号 (-) 不同
我正在使用以下命令使用 sqoop 从 Oracle 将 table 导入到 hadoop 中。但我收到错误。由于我是 hadoop 的菜鸟,我不知道如何修复它。
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.
您不应在 table 选择中指定数据库。因为数据库 TABS
已经在连接字符串中被选中,
替换,
--table tabs.user_info
和
--table user_info
让我知道这是否适合你。
verbose 中的破折号 (-) 不同