Table of Contents

Search

  1. Preface
  2. Transformations
  3. Source transformation
  4. Target transformation
  5. Aggregator transformation
  6. Cleanse transformation
  7. Data Masking transformation
  8. Deduplicate transformation
  9. Expression transformation
  10. Filter transformation
  11. Hierarchy Builder transformation
  12. Hierarchy Parser transformation
  13. Hierarchy Processor transformation
  14. Input transformation
  15. Java transformation
  16. Java transformation API reference
  17. Joiner transformation
  18. Labeler transformation
  19. Lookup transformation
  20. Mapplet transformation
  21. Normalizer transformation
  22. Output transformation
  23. Parse transformation
  24. Python transformation
  25. Rank transformation
  26. Router transformation
  27. Rule Specification transformation
  28. Sequence Generator transformation
  29. Sorter transformation
  30. SQL transformation
  31. Structure Parser transformation
  32. Transaction Control transformation
  33. Union transformation
  34. Velocity transformation
  35. Verifier transformation
  36. Web Services transformation

Transformations

Transformations

File list commands

File list commands

You can use a command to generate a list of source files for a mapping. You can use a valid DOS or UNIX command, batch file, or shell script.
Data Integration
reads each file in the list when the task runs.
Use a command to generate a file list when the list of source files changes often or when you want to generate a file list based on specific conditions. For example, you can use a command to generate a file list from all files in a directory or based on the file names.
Use the following guidelines when you generate a file list through a command:
  • You must enter Windows commands that use parameters such as "/b" in a batch file.
  • You must enter fully qualified file paths in each command, batch file, and shell script.
  • You cannot use an in-out parameter for the file list command.

UNIX Example with Shell Script

You need to extract data from parts lists that are stored on a Linux machine. The parts lists are text files that are stored in the
/home/dsmith/flatfile/parts
directory.
The following table shows the command that you enter in the Source transformation and the contents of the corresponding shell script:
Command
Shell Script (parts.sh)
/home/dsmith/flatfile/parts/parts.sh
cd /home/dsmith/flatfile/parts ls *.txt

Windows Example with Batch File

You need to extract data from sales records that are stored on a Windows machine. The sales record files are stored in the
C:\SalesRecords
directory and use the naming convention
SalesRec_??-??-2017.txt
.
The following table shows the command that you enter in the Source transformation and the corresponding batch file contents:
Command
Batch File (SalesSrc.bat)
C:\SalesRecords\SalesSrc.bat
@echo off cd C:\SalesRecords dir /b SalesRec_??-??-2017.txt

Example without Shell Script or Batch File

You can also generate a file list through a command instead of through a batch file or shell script. For example, the following command generates a file list that contains one file named source.csv:
echo C:\sources\source.csv