下面是官方的用例:

usage: sqoop merge [GENERIC-ARGS] [TOOL-ARGS]

	Merge arguments:

	   --class-name <name>     Specify record class name to load

	   --help                  Print usage instructions

	   --jar-file <file>       Load class from specified jar file
	
	   --merge-key <column>    Key column to use to join results
	
	   --new-data <path>       Path to the more recent data set
	
	   --onto <path>           Path to the older data set
	
	   --target-dir <path>     Destination path for merged results
	
	   --verbose               Print more information while working



	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.

这个命令通常的语法是

bin/hadoop command [genericOptions] [commandOptions]

下面这个是具体的例子:

sqoop merge \
	
	    --new-data /tmp/orders15 \
	
	    --onto /tmp/orders16 \
	
	    --target-dir /tmp/orders18 \
	
	    --jar-file /tmp/sqoop-hdfs/compile/a3ec63bf6ccc7a3e880eba7bd10395c4/userinfolbf.jar \
	
	    --class-name userinfolbf \
	
	    --merge-key id

sqoop已经是一个比较过时的工具的了,如果条件可以,建议还是使用datax或者其他更加强大的调度工具。–20220614更新