I am hvaing SOURCE as
1000,null,null,null
null,2000,null,null
null,null,3000,null
null,null,null,4000
Now i want the OUTPUT as
1000,2000,3000,4000
For more clarification i want to elimate nulls and want in
a single line.
Please help me out
Answer Posted / guest
Let suppose the data are as these fields
A B C D
1000,null,null,null
null,2000,null,null
null,null,3000,null
null,null,null,4000
In the mapping take A,B,C,D as input ports.set 4 output
ports for the same 4 input ports like out_A,out_B,out_C,out_D.
For out_A output port set value like-IIF(ISNULL(A),1000,A).
Similary for out_B-IIF(ISNULL(B),2000,B)
likewise for C,D.
if you don't want to hard code 1000,2000 in the expressions
written above just create 4 variable port like
var_A,Var_B,var_C,var_D before creating the output ports and
each variable port set max(A) for var_A,max(B) for var_B
port likely.
put each variable port name against 1000,2000,3000 and 4000
in respective expression.
as example for out_A set IIF(ISNULL(A),var_A,A)
Now take 4 output ports to a aggrerator transformation.set
group by any one port but not all ports at a time.
Join the ports to target.
Hurry you get result like this
1000,2000,3000,4000
Regards
Sukanta
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
pmscmd startworkflow -sv
Explain the difference between mapping parameter and mapping variable?
Partition, what happens if the specified key range is shorter and longer
Explain the scenario which compels informatica server to reject files?
Mention few power centre client applications with their basic purpose?
What is Cognos script editor?
Debugger what are the modules, what are the options you can specify when using debugger, can you change the expression condition dynamically when the debugger is running.
Explain sessions?
How to create Target definition for flat files?
Design a mapping to load the cumulative sum of salaries of employees into target table?
Hi friends I want to know about what r the dimensions in the banking porjects and genarally how many tables r in project ?
HOW TO PROCESS THE ROWS FROM JOINER AND EXPRESSION TRANSFORAMTION TO SORTER TRANSFORMATION
How to do unit testing in informatica?
I have worked on Informatica 7.1.1. I want to know the answer for the below question. Target is not created initially.Then how to take the DDL script from the source and run the Mapping by creating the Target dynamically?Is it possible by SQL Transformation?
What is joiner transformation in informatica?