suppose i have source
101 a
101 b
101 c
101 d i want target like 101 abcd how will u achive this
please give me the answer

Answers were Sorted based on User's Feedback



suppose i have source 101 a 101 b 101 c 101 d i want target like 101 abcd how will u achive this..

Answer / prabodh

S-->SQ-->SORTER-->EXP-->AGG-->TARGET
Sort on the firt port,in exp check prev and curr value by
using var ports,if same concat them ,u will get
101 a
101 a b
101 a b c
101 a b c d

from the Exp trans ,group by first port in the Agg trans ,u
will get last row i.e 101 a b c d.

Is This Answer Correct ?    11 Yes 0 No

suppose i have source 101 a 101 b 101 c 101 d i want target like 101 abcd how will u achive this..

Answer / arunakumaril

(here column names are not mentioned .so,i have taken them
as column1 and column2)

take 2 variables for current value of column1 and previous
value of column1 and use concat function for concatenating
values of column2.

(variableports)curr_col1_val:column1

(variableports)res:if(curr_col1_val=pre_col1_val,concat
(res,column2),column2)

(variableports)pre_col1_val:column1

Is This Answer Correct ?    4 Yes 0 No

suppose i have source 101 a 101 b 101 c 101 d i want target like 101 abcd how will u achive this..

Answer / babu

Hi Aruna,

U r answer has small change,i.e one output port and in
aggregator t/r column1 is group by port not column2.

SRC
|
SQ
|
EXP
{
(variable port) var:IIF(col1=var1,concat(var,col2),col2)
(variable port) var1:(col1)
(output port) oup:var
}
|
AGGR(COL1 AS A GROUP BY PORT)
|
TRG

MAPPING DESIGN::

SRC-->SQ-->EXP-->AGGR-->TRG

Is This Answer Correct ?    4 Yes 1 No

suppose i have source 101 a 101 b 101 c 101 d i want target like 101 abcd how will u achive this..

Answer / arunakumari l

(here column names are not mentioned .so,i have taken them
as column1 and column2)

take 2 variables for current value of column1 and previous
value of column1 and use concat function for concatenating
values of column2.

STEP1:
use this below logic in expression transformation:-

(variableports)curr_col1_val:column1

(variableports)res:if(curr_col1_val=pre_col1_val,concat
(res,column2),column2)

(variableports)pre_col1_val:column1

STEP2:
Take groupby on column2 in aggregator

Is This Answer Correct ?    1 Yes 1 No

suppose i have source 101 a 101 b 101 c 101 d i want target like 101 abcd how will u achive this..

Answer / santosh

HI ARUNAKUMARI,

IAM RAJU,WHAT IS MAPPPING DESIGN OF THIS SCENARIO AND WHERE WE DESIGN LIKE IN TRANSFORMER STAGE OR ANY AND WHAT IS(variableports)& WHICH STAGES ARE SQ AND EXP AND SORTER.
IAM A NEW IN DATASTAGE,PLS EXPLAIN ABOUT THIS CLEARLY

THANKS ADVANCE.
(here column names are not mentioned .so,i have taken them
as column1 and column2)

take 2 variables for current value of column1 and previous
value of column1 and use concat function for concatenating
values of column2.

(variableports)curr_col1_val:column1

(variableports)res:if(curr_col1_val=pre_col1_val,concat
(res,column2),column2)

(variableports)pre_col1_val:column1

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Informatica Interview Questions

Can I use same Persistent cache(X.Dat) for 2 sessions running parallely? If it is not possible why?If yes How?

0 Answers  


How might one distinguish in the case of mapping is right or not without associating session?

0 Answers  


how lookup is acting as both active and passive ? how is it possitble?

9 Answers   TCS,


Without source how to insert record to target?

6 Answers  


Update strategy transformation is an active transformation.How it changes the number of records that pass through it? Please explain....

2 Answers  






What is parallel processing in informatica?

0 Answers  


How to create the list file having millions of flat files while indirect loading in informatica? In indirect file loading, suppose we have less no.of flat files then we can enter files names manually in list file creation. If millions of files are there, how can we enter the flat file names in list file?

0 Answers   HP,


how we load the data from source to staging area

4 Answers   TCS,


Hi, Can someone send me the DWH and Informatica FAQ's at vanibv6@gmail.com Thanks in Advance, Vani

2 Answers   Wipro,


whats the option in informatica 7 version is outdated in informatica 8 version onwards.

1 Answers   iGate,


How do you use reject loader.

0 Answers  


How to eliminate duplicates from flat file..what is the procedure

4 Answers  


Categories