Sending a Target File to an FTP or SFTP Server

You can use DataMigrator to build a flow that automatically sends the target file to a directory on a FTP server. This can be useful if, for example, a target file has to be created on a remote FTP location. This feature is available for the synonyms of a Flat File and a Delimited Flat File. The synonym can be used in a Direct Load Flow, as well as in a Data Flow.

The examples in this section use a synonym for a Flat File in a Direct Load Flow.

Before you create and run the data flow discussed in this section, you must configure the Adapter for a Flat File. After the adapter is configured, you need to create the sample data and synonyms for DataMigrator - General. This will create the source and target synonyms that are used in the following examples.

To implement and run a flow that sends a target to a FTP server, you must:

  1. Create a connection to a FTP location.
  2. Create a synonym with FTP attributes.
  3. Create a Direct Load Flow that uses this synonym as a target.

Top of page

Example: Creating a Connection to a FTP or SFTP Location

Note: If you are using SFTP, you must first set up an SSH connection without a password. For more information, see Using Secure Shell FTP (SFTP).

To configure a connection to a FTP server:

  1. Expand the Adapters folder, followed by the Configured folder.
  2. Right-click the Flat File or Delimited Flat File folder and click Add Connection.
  3. Enter the Connection Parameters, as shown in the following image.

    Connection parameters

    Host Name

    Name or IP address of the FTP or SFTP server.

    Initial Directory

    Directory on the FTP or SFTP server to connect to. This value is optional. If it is not specified, either of the following will be used:

    • The default initial directory.
    • The directory name entered on a synonym for a DATASET parameter value, entered with a file name, such as mydir/myfile.txt.
    User

    User ID to connect to the FTP or SFTP server.

    Password

    Password to connect to the FTP or SFTP server.

    Protocol

    The file protocol that is being used, either FTP or SFTP (SSH FTP).


Top of page

Example: Creating a Synonym with FTP Attributes
  1. Open the synonym dminva in the Synonym Editor, as seen in the following image.

  2. Enter the file name in the DATASET parameter.
  3. Expand the DB Log Parameters group, as shown in the following image.

    Properties

  4. Enter the Connection value that was created for the Flat File adapter.

    Leave the DATA_ORIGIN parameter blank.

  5. Leave the DIRECTORY, NAME, and EXTENSION parameters blank since these values have already been specified in the DATASET parameter.
  6. Save the synonym with the new name dminva_ftp.
  7. Close the synonym.

Top of page

Example: Creating a Flow that Sends a File to an FTP Server
  1. Right-click an application directory, select New, and then click Direct Load Flow.

    The Direct Load Flow opens.

  2. From the browser window, drag the dminv source object from the application directory to the left of the center line of the workspace.
  3. Drag the dminv_ftp target object that was created from the ibisamp application directory to the right of the target line in the workspace, as shown in the following image.

  4. Right-click the target object and click Target Transformations.

    The Transformations window opens.

  5. Click the Automap button.
  6. Save the flow as dminvftp.

iWay Software