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

Hybrid macros

Hybrid macros

A hybrid macro expands an expression both vertically and horizontally. A hybrid macro generates a set of vertical expressions that also expand horizontally.
Configure a hybrid macro based on your business requirements. Use the configuration guidelines for vertical and horizontal macros to create a hybrid macro.

Example

For example, the following expression uses the %OPR_IIF% horizontal expansion function to convert the format of the date fields represented by the %dateports% macro input field to the 'mm-dd-yyyy' format:
%OPR_IIF[IS_DATE(%dateports%,%fromdateformat%),TO_STRING(TO_DATE(%dateports%,%fromdateformat%),'mm-dd-yyyy'),%dateports%]%
The %fromdateformat% macro input field defines the different date formats used in the date fields: mm/dd/yy and mm/dd/yyyy.
At run time, the application expands the expression vertically and horizontally, as follows:
IIF(IS_DATE(StartDate,’mm/dd/yy’),TO_STRING(TO_DATE(StartDate,’mm/dd/yy’),’mm-dd-yyyy’), IIF(IS_DATE(StartDate,’mm/dd/yyyy’),TO_STRING(TO_DATE(StartDate,’mm/dd/yyyy’),’mm-dd-yyyy’), StartDate)) IIF(IS_DATE(EndDate,’mm/dd/yy’),TO_STRING(To_Date(EndDate,’mm/dd/yy’),’mm-dd-yyyy’), IIF(IS_DATE(END _DT,’mm/dd/yyyy’),TO_STRING(TO_DATE(EndDate,’mm/dd/yyyy’),’mm-dd-yyyy’), EndDate))
The expression expands vertically to create an expression for the StartDate and EndDate fields that %dateports% represents. The expression also expands horizontally to use the constants that %fromdateformat% represents to evaluate the incoming fields.

0 COMMENTS

We’d like to hear from you!
Patrick Dwyer - June 05, 2023

The example shows the "IsDate" function. This should be corrected to "Is_Date" function.

Informatica Documentation Team - June 05, 2023

Hi Patrick Dwyer,

You are correct. Thanks so much for bringing this to our attention! We'll fix it in the next major release.