The SFTP connector supports moving data between a Secure File Transfer Protocol (SFTP) server and other supported Sqoop2 connectors.
Currently only the TO direction is supported to write records to an SFTP server. A FROM connector is pending (SQOOP-2218).
Before executing a Sqoop2 job with the SFTP connector, set mapreduce.task.classpath.user.precedence to true in the Hadoop cluster config, for example:
<property> <name>mapreduce.task.classpath.user.precedence</name> <value>true</value> </property>
This is required since the SFTP connector uses the JSch library (http://www.jcraft.com/jsch/) to provide SFTP functionality. Unfortunately Hadoop currently ships with an earlier version of this library which causes an issue with some SFTP servers. Setting this property ensures that the current version of the library packaged with this connector will appear first in the classpath.
To use the SFTP Connector, create a link for the connector and a job that uses the link.
Inputs associated with the Job configuration for the TO direction include:
|Output directory||String||The location on the SFTP server that the connector will write files to. Required||uploads|
- The output directory value needs to be an existing directory on the SFTP server.