SEOSEO News

IICS Micro and Macro Services / Blogs / Perficient


 

Macros in IICS

 

Informatica IICS: A useful technique for creating complex or repeating expressions in mappings is an expression macro. This makes it possible to carry out computations over a range of fields or constants.

creating a collection of related expressions so that the same computation can be done on several input fields.

Steps to Use Macros:

  1. Login into your informatica cloud account and open Data Integration microservice.
    Iics 1
  2. Now, create a new mapping by clicking on New from Navigation window and Select Mapping and click on create.
    Iics 2
  3. Select source and target Objects in Source and Target Transformations.
    Iics 3
  4. Now, Create an Expression Transformation in IICS mapping between Source and Target.
    Iics 4
  5. Click the “+” icon in Expression Transformation to create an input macro field. Then, choose “Input_Macro_Field” as the field type, as shown below.
    Iics 5
  6. Configure the port according to the requirements (that is, whether we wish to apply the same logic or condition to all fields or just a few specific fields) as indicated below after generating the input macros.
    Iics 6
  7. Create an additional field in the same way as before, but this time choose “Output_Macro_Field” as the field type for the output macro, choose the data type, and set the precision to “Max” in order to avoid data truncation, as shown below..
    Iics 7
  8. Configure your macro expression in the output macro.
  9. For example, we had to apply the LTRIM RTIM function and set all blank values to null. However, attempting to validate this expression resulted in an error: ‘This expression cannot be validated because it uses macro input fields’ . So, avoid from clicking the Validate button.
    Iics 8
  10. Navigating to the target, you will see an additional incoming field from the expression “%Input_Macro%_out.” As shown below.
    Iics 9
  11. In Target Transformation, choose ‘Completely Parameterized‘ under field mapping, and then create a new parameter as indicated below.
    Iics 10
  12. Now save the mapping.
  13. Create a Mapping Configuration Task (MCT) and Select Runtime Environment and click Next .
  14. Map all the fields with the suffix “_out” in order to allow expression logic to be applied in expression macros as shown below.
    Iics 11
  15. Click “Finish” and run MCT to complete the mapping requirements.

 





Source link

Related Articles

Back to top button
error

Enjoy Our Website? Please share :) Thank you!