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

Answers were Sorted based on User's Feedback



I am hvaing SOURCE as 1000,null,null,null null,2000,null,null null,null,3000,null null,null,nul..

Answer / 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

I am hvaing SOURCE as 1000,null,null,null null,2000,null,null null,null,3000,null null,null,nul..

Answer / kondeti srinivas

it is so simple
write a query like this

SELECT MAX(A),MAX(B),MAX(C),MAX(D) FROM TABLE_NAME

Is This Answer Correct ?    3 Yes 1 No

I am hvaing SOURCE as 1000,null,null,null null,2000,null,null null,null,3000,null null,null,nul..

Answer / adisekhar

FROM THE ABOVE ANSWER WE HAVE TO ADD NORMALIZER TRANSFORMATION

Is This Answer Correct ?    1 Yes 0 No

I am hvaing SOURCE as 1000,null,null,null null,2000,null,null null,null,3000,null null,null,nul..

Answer / madhavi

In the lookup transformation->properties->presql condtion
write delete from table_name where column_name="NULL";.

Is This Answer Correct ?    1 Yes 1 No

I am hvaing SOURCE as 1000,null,null,null null,2000,null,null null,null,3000,null null,null,nul..

Answer / arunakumari l

let us take column names as col1,col2,col3,col4

STEP1:Add normalizer and place occurs value as 4

STEP2:use filter to eliminate null values

STEP3:take expression transformation and use concat
function to concatenate row values

i think this might work
tell me if i am wrong

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Informatica Interview Questions

What is the benefit of partitioning a session?

0 Answers  


What is the difference Between Mapping parameter and variable

3 Answers   Accenture,


what is incremental data aggregation?

3 Answers   IBM,


what is data driven in informatica

5 Answers   IBM,


wat transf shud i use to achieve this id sal id sal sum src-1 20 tgt 1 20 40 1 20 1 20 40 2 15 2 15 35 2 20 2 20 35

2 Answers  






State the limitations where we cannot use joiner in the mapping pipeline?

0 Answers  


What are the limitations of joiner transformation?

0 Answers   Informatica,


how can import the data from the flat files?

2 Answers  


How informatica recognizes mapping?

2 Answers   CTS,


Converting Rows to columns I have Relational source like his. JAN FEB MAR APR 100 200 300 400 500 600 700 800 900 100 200 300 I need to convert these rows into columns to the targe. MONTH TOTAL JAN 1500 FEB 900 MAR 1200 APR 1500 Please experts help me

5 Answers   HP,


WAT IS TEXT LOAD?

3 Answers   Wipro,


Explain lookup transformation is active in informatica

0 Answers   Informatica,


Categories