[英]Explain How to Work MOD Function in Informatica Powercenter & How this Condition Work in Expression Transformation IIF((Nextval % 5) = 0, 1, 0)
I want to Load Alternate Record in Table &我想在表中加载备用记录 &
Also Load Every Fifth Record Load in the Table.还要在表中加载每第五个记录加载。 This are two Different Scenario I Got Query how to Implement I Just Don't Understand How it is Working.
这是两个不同的场景,我查询如何实施我只是不明白它是如何工作的。
What is MOD Function & How MOD Function is Working in Informatica Powercenter.什么是MOD Function以及MOD Function 如何在 Informatica Powercenter 中工作。
How this Condition Work in Expression Transformation IIF((Nextval % 5) = 0, 1, 0)此条件在表达式转换中的工作原理IIF((Nextval % 5) = 0, 1, 0)
For Ex: - My Source Table Contain 107 Records .例如:-我的源表包含107 条记录。 So Using this Condition IIF((Nextval % 5) = 0, 1, 0) How it will Load Every Fifth Record in the Target Table?
那么使用这个条件IIF((Nextval % 5) = 0, 1, 0)它将如何加载目标表中的每五个记录?
You are on right track.你走在正确的轨道上。
sequence generator will generate sequential values for Nextval
field in expression.序列生成器将为表达式中的
Nextval
字段生成序列值。
And IIF((Nextval % 5) = 0, 1, 0) will pick every 5th record. IIF((Nextval % 5) = 0, 1, 0) 将每 5 条记录选取一次。
MOD()
- like any arithmetic function, will return reminder of a division operation. MOD()
- 与任何算术 function 一样,将返回除法运算的提醒。 for example, MOD(5,2) = 1
same can be done in informatica 5%2
= 1.例如,
MOD(5,2) = 1
同样可以在 informatica 5%2
= 1 中完成。
So, your mapping should be like -所以,你的映射应该是这样的 -
IIF((Nextval % 2) = 0, False, True) -- picks odd rows.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.