Sending a Target File to an 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:
- 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 Location
To
configure a connection to a FTP server:
- Expand the Adapters folder,
followed by the Configured folder.
- Right-click the Flat File folder and
select Add Connection.
- 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.
- 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.
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 and select New, 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 select Target Transformations.
The
Transformations window opens.
- Click the Automap button.
- Save the flow as dminvftp.