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
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 |
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 |
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 |
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 |
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 |
What are the diffrences between joiner transformation and source qualifier transformation?
Q. WE ARE LOADING ORACLE TABLE THE PROCESS RUNS THREE HOURS. THIS TABLE IS BEING USED BY SOME DOWNSTREAM TEAMS SO WHAT WE WANT IS IN BETWEEN RUN IS PROGRESS IF ANYONE IS FETCHING THE DATA FROM THE TABLE THEY SHOULD SEE DATA TILL YESTERDAY TILL THAT. AFTER THAT PROCESS IS COMPLETED ONLY THEN TEAM SHULD BE AVAIBLE TO SEE TODAY DATA UPDATED. WE DONOT WANT TO LOG THE TABLE. NEED APROACH FROM YOUR SIDE.
write a query to get maximum salary from the employers table without duplicates....kindly help me
IN A MAPPING WHEN WE USE AGGRIGATER TRANSFORMATION WE WILL USE GROUP BY PORT. IF GROUPBY IS NOT SELECTED BY DEFAULT IT WILL TAKE ONLY THE LAST COLUMN WHY????
What does role playing dimension mean?
What happens if you increase commit intervals and also decrease commitExplain grouped cross tab?
Can anyone briefly describe abt audit table loading?
I want expect first and last record remaining all records will be loaded into target? which transformations we can use?
my source contain data like this eno ename phno 100 john 9989020508 101 ram 7246599999 i want to load the data into target is eno name phno 100 john (998)-9020-508 102 ram (724)-6599-999.
Limitation of REPLACESTR. Is there any character limitation to it.
How to delete duplicate record in Informatica?
How we can create indexes after completing the loan process?