top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How the expression transformation works?

0 votes
362 views

Suppose, I am getting id, marks as input to expression transformation. I am calculating values like this.

ID--------------------------------------Input/Output Port 
MARKS-----------------------------------Input Port
O_RESULT= V_RESULT----------------------Output Port
V_RESULT=IIF(MARKS > 60,"PASS","FAIL")--Variable Port

When i debug this code, Normally it calculates the values in the sequencial order. In above example, i have assigned V_RESULT to O_RESULT before calculating it. Still it is showing right result. Ideally, It should show NULL value.

Can somebody tell me why is it showing correct result?

Is there any setting in informatica for reference values? Does it store any unknown value reference for it and later replace it?

Would be grateful for help.

posted Sep 22, 2014 by Sachin

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

Output ports are evaluated after variable ports.

Add an expression transformation with two variable ports:

PORT             EXPRESSION
in_sal           N/A
v_previous_sal   v_current_sal
v_current_sal    in_sal
out_sal          v_previous_sal

Read this excerpt from the documentation to understand the port order:

The Integration Service evaluates ports in the following order:

1.Input ports. The Integration Service evaluates all input ports first since they do not depend on any other ports. Therefore, you can create input ports in any order. Since they do not reference other ports, the Integration Service does not order input ports.

2.Variable ports. Variable ports can reference input ports and variable ports, but not output ports. Because variable ports can reference input ports, the Integration Service evaluates variable ports after input ports. Likewise, since variables can reference other variables, the display order for variable ports is the same as the order in which the Integration Service evaluates each variable.

For example, if you calculate the original value of a building and then adjust for depreciation, you might create the original value calculation as a variable port. This variable port needs to appear before the port that adjusts for depreciation.

3.Output ports. Because output ports can reference input ports and variable ports, the Integration Service evaluates output ports last. The display order for output ports does not matter since output ports cannot reference other output ports. Be sure output ports display at the bottom of the list of ports.

answer Sep 23, 2014 by Shweta Singh
0 votes

In Expression Transformation, Port assignments are done in the order of Input, Variable and Output respectively. If Input port is coming below the variable ports then values first assign to Input ports then variable and same is done in case of Output ports. ×× √
PortName I O V Expression
Port1 √ √
V_Port1 √ Port1
In_port2 √
out_port1 √ V_port2
v_port2 √ In_port2

Assignment order will be
port1
In_port2
v_port1
v_port2
out_port1

means all Input ports 1st then Variable ports and then output ports. Please let me know if you need any further clarification.

answer Sep 28, 2014 by anonymous
Similar Questions
+1 vote

I have source column(amount) with datatype string, contains the datas like $793.00, $5791.00,...

I need to load this same data into the target table column(amount) with datatype NUMBER

how can i get this same data with '$' symbol in target by using expression transformation in informatica?

anyone help me please, thanks in advance.

+2 votes

I have source column(amount) with datatype string, contains the datas like $793.00, $5791.00,...

I need to load this same data into the target table column(amount) with datatype NUMBER

How can i get this same data with '$' symbol in target by using expression transformation in informatica?

...