Sending a Target File to a FTP 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(s) 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 Location

To configure a connection to a FTP server:

  1. Select Adapters and then Configured.
  2. Right-click the Flat File folder and select Add Connection.
  3. Enter the Connection Parameters as shown in the following image.

    Host Name

    Name or IP address of the FTP server.

    Initial Directory

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

    the default initial directory

    or

    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 server.

    Password

    Password to connect to the FTP server.


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 Data Allocation group, as shown in the following image.

  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 and select New, 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 select Target Transformations.

    The Transformations window opens.

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

iWay Software