Informatica发送电子邮件的条件

时间:2022-04-27 20:30:15

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

这是一个场景。我有一个表,X有下面的结构

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.

我想给一个特定的邮件id发一封邮件,如果在COLUMN2中没有F,就说‘PASS’;如果在COLUMN2中只有一个F,就说‘ALERT’。

TIA!! :)

TIA ! !:)

1 个解决方案

#1


2  

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

如果您必须在Informatica PowerCenter中这样做,下面是一个可能的解决方案:

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.

使用映射变量(比如var_m_F_COUNT(int))创建映射。使用聚合器转换计算Fs的数量,并使用计数设置变量。

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.

创建一个工作流变量(比如var_wkf_F_COUNT)。在赋值任务集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.

在会话中,在会话前变量分配中,分配var_m_F_COUNT=var_wkf_F_COUNT。在成功变量分配的会话后,分配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

现在,双击电子邮件任务的链接(用于“ALERT”),并编写codition var_wkf_F_COUNT>

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

您可以创建另一个电子邮件任务,其链接条件为“PASS”的var_wkf_F_COUNT=0

#1


2  

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

如果您必须在Informatica PowerCenter中这样做,下面是一个可能的解决方案:

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.

使用映射变量(比如var_m_F_COUNT(int))创建映射。使用聚合器转换计算Fs的数量,并使用计数设置变量。

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.

创建一个工作流变量(比如var_wkf_F_COUNT)。在赋值任务集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.

在会话中,在会话前变量分配中,分配var_m_F_COUNT=var_wkf_F_COUNT。在成功变量分配的会话后,分配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

现在,双击电子邮件任务的链接(用于“ALERT”),并编写codition var_wkf_F_COUNT>

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

您可以创建另一个电子邮件任务,其链接条件为“PASS”的var_wkf_F_COUNT=0