Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Transformations
  3. Source transformation
  4. Target transformation
  5. Access Policy transformation
  6. Aggregator transformation
  7. B2B transformation
  8. Chunking transformation
  9. Cleanse transformation
  10. Data Masking transformation
  11. Data Services transformation
  12. Deduplicate transformation
  13. Expression transformation
  14. Filter transformation
  15. Hierarchy Builder transformation
  16. Hierarchy Parser transformation
  17. Hierarchy Processor transformation
  18. Input transformation
  19. Java transformation
  20. Java transformation API reference
  21. Joiner transformation
  22. Labeler transformation
  23. Lookup transformation
  24. Machine Learning transformation
  25. Mapplet transformation
  26. Normalizer transformation
  27. Output transformation
  28. Parse transformation
  29. Python transformation
  30. Rank transformation
  31. Router transformation
  32. Rule Specification transformation
  33. Sequence transformation
  34. Sorter transformation
  35. SQL transformation
  36. Structure Parser transformation
  37. Transaction Control transformation
  38. Union transformation
  39. Vector Embedding transformation
  40. Velocity transformation
  41. Verifier transformation
  42. 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

0 COMMENTS

We’d like to hear from you!