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:
- Create a connection to a FTP location.
- Create a synonym with FTP attributes.
- Create a Direct Load Flow that uses this synonym as a target.
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:
- Expand the Adapters folder,
followed by the Configured folder.
- Right-click the Flat File or Delimited
Flat File folder and click Add Connection.
- Enter the Connection Parameters, as shown in the following image.
-
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).
Example: Creating a Synonym with FTP Attributes
- Open the synonym dminva in the Synonym Editor, as seen
in the following image.
- Enter the file name in the DATASET parameter.
- Expand the DB Log Parameters group, as
shown in the following image.
- Enter the Connection value that was created for the Flat File
adapter.
Leave the DATA_ORIGIN parameter
blank.
- Leave the DIRECTORY, NAME, and EXTENSION parameters
blank since these values have already been specified in the DATASET
parameter.
- Save the synonym with the new name dminva_ftp.
- Close the synonym.
Example: Creating a Flow that Sends a File to an FTP Server
- Right-click an application directory, select New,
and then click Direct Load Flow.
The Direct
Load Flow opens.
- From the browser window, drag the dminv source object
from the application directory to the left of the center line of
the workspace.
- 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.
- Right-click the target object and click Target Transformations.
The
Transformations window opens.
- Click the Automap button.
- Save the flow as dminvftp.