Design > Flat Files > File Lists
  

File Lists

You can use a file list as a source for flat file connections.
Use a file list to enable a task to read multiple source files for one source object in a mapping. For example, you might want to use a file list if your organization collects data for multiple locations that you want to process through the same mapping. A file list is a file that contains the names and directories of each source file you want to use in a mapping. You configure a Source transformation in the mapping to read the file list. You can also specify to write the source file name to each target row. When you run a mapping that uses a file list, the task reads rows of data from the different source files in the file list.

Creating a File List

A file list contains the names of all the source files you want a task to use for the source instance when you run the mapping. Create the file list in a text editor and save it as a text file.
Use the following rules and guidelines when you create the file list:
The following example shows a valid file list. The customers_canada.dat file resides in the same folder as the file list.
customers_canada.dat
C:\Customer_Accounts\customers_us.dat
C:\Customer_Accounts\customers_uk.dat
C:\Customer_Accounts\customers_india.dat
After you create the file list, place it in a directory local to the Secure Agent.

Using a File List

To use a file list in a mapping, create or obtain the file list and install it locally to the Secure Agent before you configure the Source transformation to use the file list.
    1. In the Mapping Designer, select a flat file connection for the Source transformation and select the File List source type. Select the file list text file to use in the mapping.
    The following image shows a Source transformation configured to use a file list:
    The Source tab for the Source transformation shows the File List source type. The source object is a file list text file.
    2. Optionally, to write the source file name to each target row, click the Fields tab and then click Add FileName Column to Table.
    The CurrentlyProcessedFileName field is added to the fields table.