Examples

Examples of the GET map function

In the following example, assume that the adapter is used in a GET function.

  • When the adapter is used to fetch file content:
    GET("SFTP", "-USR testUser -HOST host1 -PORT 22 -PA pass1 -PWD pwd1 -P /myDirectory/MyFile.txt -RM file_data -TV /tmp/logfile.log")
  • When the adapter is used to fetch file list:
    GET("SFTP", "-USR testUser -HOST host1 -PORT 22 -PA pass1 -PWD pwd1 -P /myDirectory/ -RM file_list -TV /tmp/logfile.log")
  • When the adapter is used to File Success Action:
    GET("SFTP", "-USR testUser -HOST host1 -PORT 22 -PA pass1 -PWD pwd1 -P /myDirectory/MyFile.txt -RM file_data -FSA keep -TV/tmp/logfile.log")

Examples of the PUT map function

In the following example, assume that the adapter is used in a PUT function.

  • When the adapter is used to create a new file, if the file is not present:
    PUT ("SFTP", "-USR testUser -HOST host1 -PORT 22 -PA pass1 -PWD pwd1 -P /myDirectory/MyFile.txt -WM create -TV /tmp/logfile.log", in_data_type)
  • When the adapter is used to overwrite an existing file:
    PUT ("SFTP", "-USR testUser -HOST host1 -PORT 22 -PA pass1 -PWD pwd1 -P /myDirectory/MyFile.txt -WM overwrite -TV /tmp/logfile.log", in_data_type)
  • When the adapter is used to append data to an existing file:
    PUT ("SFTP", "-USR testUser -HOST host1 -PORT 22 -PA pass1 -PWD pwd1 -P /myDirectory/MyFile.txt -WM append -TV /tmp/logfile.log", in_data_type)
  • When the adapter is requested to automatically create missing directories:
    PUT ("SFTP", "-USR testUser -HOST host1 -PORT 22 -PA pass1 -PWD pwd1 -P /myDirectory/MyFile.txt -WM create -CD -TV /tmp/logfile.log", in_data_type)