Search code examples
emailetlinformaticainformatica-powercenter

Informatica sending E-Mail on a condition


So here's a scenario. I have a table say X with the below structure

COLUMN1    COLUMN2
1            T
2            F
3            T
4            T
5            F

I want to send an E-MAIL to a specific mail-id saying 'PASS' if there is no 'F' in COLUMN2 and an E-MAIL saying 'ALERT' if there is even a single 'F' in column2.

TIA!! :)


Solution

  • If you must do this in Informatica PowerCenter, below is a possible solution:

    Create a mapping with a mapping variable (say var_m_F_COUNT(int)). Using a aggregator transformation count the number of Fs and set the variable with the count.

    Now create a workflow as follows:

    start ---> assignment task ---> session ---condition---> email task

    Create a workflow variable (say var_wkf_F_COUNT). In the assignment task set var_wkf_F_COUNT = 0.

    In the session, in Pre-session variable assignment, assign var_m_F_COUNT=var_wkf_F_COUNT. In post-session on success variable assignment, assign var_wkf_F_COUNT=var_m_F_COUNT.

    Now, double click the link to the email task(for 'ALERT') and write the codition var_wkf_F_COUNT>0

    You can create another email task with the link condition as var_wkf_F_COUNT=0 for 'PASS'