The following scenario creates a three-component Job, which aims at listing files from a defined directory, reading each file by iteration, selecting delimited data and displaying the output in the Run log console.
Drop the following components from the Palette to the design workspace: tFileList, tFileInputDelimited, and tLogRow.
Right-click the tFileList component, and pull an Iterate connection to the tFileInputDelimited component. Then pull a Main row from the tFileInputDelimited to the tLogRow component.
Double-click tFileList to display its Basic settings view and define its properties.
Browse to the Directory that holds the files you want to process. To display the path on the Job itself, use the label (__DIRECTORY__) that shows up when you put the pointer anywhere in the Directory field. Type in this label in the Label Format field you can find if you click the View tab in the Basic settings view.
In the Basic settings view and from the FileList Type list, select the source type you want to process, Files in this example.
In the Case sensitive list, select a case mode, Yes in this example to create case sensitive filter on file names.
Keep the Use Glob Expressions as Filemask check box selected if you want to use global expressions to filter files, and define a file mask in the Filemask field.
Double-click tFileInputDelimited to display its Basic settings view and set its properties.
Enter the File Name field using a variable containing the current filename path, as you filled in the Basic settings of tFileList. Press Ctrl+Space bar to access the autocomplete list of variables, and select the global variable
((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")). This way, all files in the input directory can be processed.
Fill in all other fields as detailed in the tFileInputDelimited section. Related topic: tFileInputDelimited.
Select the last component, tLogRow, to display its Basic settings view and fill in the separator to be used to distinguish field content displayed on the console. Related topic: tLogRow.