Informatica 云 - CASE stmt

Informatica Cloud - CASE stmt

我想在进一步处理之前检查 Informatica 云中的映射中的数据是否存在数据.. 这是我的 Teradata DB 查询,我想在 informatica cloud 中做同样的事情

select CASE WHEN A_COUNT = 0 THEN 'FAIL' 
            WHEN B_COUNT = 0 THEN 'FAIL'
            WHEN C_COUNT = 0 THEN 'FAIL'
       ELSE 'PASS'
       END CHECK
from 
(
select SUM(case when source = 'A' then 1 else 0 end) A_COUNT,
       SUM(case when source = 'B' then 1 else 0 B_COUNT,
       SUM(case when source = 'C' then 1 else 0 end) C_COUNT
from TABL1
where source in ('A', 'B', 'C', 'D')
) ;

Table:

CREATE TABLE TABL1
(SOURCE CHAR(1), DT DATE);

数据:

INSERT INTO TABL1 ('A', '01-NOV-2021');
INSERT INTO TABL1 ('A', '02-NOV-2021');
INSERT INTO TABL1 ('B', '01-NOV-2021');
INSERT INTO TABL1 ('B', '02-NOV-2021');
INSERT INTO TABL1 ('C', '01-NOV-2021');
INSERT INTO TABL1 ('C', '04-NOV-2021');

我没有把查询作为源的奢侈..这就是为什么我需要创建映射..:(

使用 Aggregator Transformation 计算 SUM,然后使用 Expression TransformationIIF 函数,如:

IIF(A_COUNT = 0 OR B_COUNT = 0 OR C_COUNT = 0; 'FAIL'; 'PASS')