To use a file list in a Source transformation, create the text file, batch file, or shell script that creates the file list. Then configure the Source transformation to use the file list.
Create the text file, batch file, or shell script that creates the file list and install it locally to the Secure Agent.
In the Mapping Designer, select the Source transformation.
On the
Source
tab, select a flat file connection.
To use a manually created file list, perform the following steps:
In the
Source Type
field, select
File List
.
In the
Object
field, select the text file that contains the file list.
On the
Fields
tab, verify the incoming fields for the Source transformation.
Data Integration
extracts source fields from the first file in the file list. If the source fields are not correct, you can add or remove fields.
To use a file list that is generated from a command, perform the following steps:
In the
Source Type
field, select
Command
.
In the
Sample Object
field, select the sample file from which
Data Integration
extracts source fields.
You can use one of the files you use to generate the file list as the sample file or select a different file.
In the
Command
field, enter the command that you use to generate the file list, for example,
/home/dsmith/flatfile/parts/parts.sh
.
On the
Fields
tab, verify the incoming fields for the Source transformation.
If the source fields are not correct, you can add or remove fields, or click the
Source
tab and select a different sample file.
Optionally, to write the source file name to each target row, click the
Fields
tab, and enable the
Add Currently Processed Filename field
option.
The CurrentlyProcessedFileName field is added to the fields table.