文档库 最新最全的文档下载
当前位置:文档库 › Informatica变量VARIABLES研究

Informatica变量VARIABLES研究

变量VARIABLES

特性:

在每次SESSION中可以改变,在SESSION成功后 Integration Service 保存变量的一个新值,并

且下次再运行SESSION时你可以使用这个变量值。

如果你定义一个变量叫$$State

你在Source Qualifier里面使用

你用STATE = '$$State' 如果变量值为ONUSE 那么解释为 STATE = 'ONUSE'

在其余的中间组件里面

你用STATE = $$State 如果变量值为ONUSE 那么解释为 STATE = "$$State"

Integration Service保存2个值为每个mapping variable当SESSION运行中:

Start value of a mapping variable

Current value of a mapping variable

Variable Functions

Variable Function Valid Aggregation Types Valid Datatype

SetVariable Max or Min All transformation datatypes except binary

datatype.

SetMaxVariable Max only All transformation datatypes except binary

datatype.

SetMinVariable Min only All transformation datatypes except binary

datatype.

SetCountVariable Count only Integer and small integer datatypes only.

SetMaxVariable.Sets the variable to the maximum value of a group of values. It ignores

rows marked for update, delete, or reject.

SetMinVariable.Sets the variable to the minimum value of a group of values. It ignores

rows marked for update, delete, or reject.

SetCountVariable. Increments the variable value by one. In other words, it adds one

to the variable value when a row is marked for insertion, and subtracts one when the row is marked for deletion. It ignores rows marked for update or reject. SetVariable. Sets the variable to the configured value. At the end of a session, it compares the final current value of the variable to the start value of the variable. Based on the aggregate type of the variable, it saves a final value to the repository.

Cannot use variable functions in the Rank or Aggregator transformation。

Mapping parameter and variable values in mapplets must be preceded by the mapplet name in the parameter file, as follows: mappletname.parameter=value

mappletname.variable=value

下面情况发生事不保存变量的修改值:

SESSION失败/SESSION被设置为测试LOAD/是DEBUG SESSION/处于DEBUG模式下并且被设置为抛

弃SESSION的输出。

实验:

1。建立一个变量Count 设置如下:integer型,Count类

2.在MAPPING中的F(X)组件中使用它:

用固有的函数对变量的值进行控制。

如果其它输出端口想使用该变量的当前值,可以变量对应的端口Port Name.

注意变量端口在这个里面是看不到的要进去才可以看到。

相关文档