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

Flat file targets with dynamic file names

Flat file targets with dynamic file names

If you create a flat file target at run time, you can specify a dynamic file name. A dynamic file name uses an expression to generate the file name.
You can use a dynamic file name to create a new target file every time the
mapping
task runs. For example, the following expression creates a file called "OrdersOut_<system_timestamp_with_second_precision>.csv" each time the
mapping
task runs:
'OrdersOut_'||To_Char(SYSDATE, 'YYYYMMDDHH24MISS')||'.csv'
You can also use a dynamic file name in a mapping that contains a Transaction Control transformation to write data to a different target file each time a transaction boundary changes. For example, the following expression can be used in a target that is downstream of the Transaction Control transformation to commit data to a different target file every time the DEPT_ID field changes:
'Results_Dept_'||To_Char(DEPT_ID)||'.dat'
To specify a dynamic file name, in the
Target Object
dialog box, select
Use a Dynamic File Name
and enter the file name expression in the expression editor.
The following image shows the
Target Object
dialog box with the
Use a Dynamic File Name
option enabled:
The image shows the Target Object dialog box for a flat file target. The "Create New at Runtime" option is selected and the "Use a Dynamic File Name" check box is checked. Because a dynamic file name is selected, the expression editor appears in the dialog box. The expression 'Results_Dept_'||To_Char(DEPT_ID)||'.dat' is entered in the expression editor.
You can include incoming field names, constants, operators, built-in functions, and user-defined functions in the target file name expression.
For more information about creating expressions, see the
Function Reference
.