hi all hi have flat file like below my requirement is
empid,ename,sal,loc
101,vamshi,5000,hyd
101,vamshi,5020,hyd
201,raju,5000,hyd
202,ram,4000,hyd
203,kumar,3500,pune
203,kumar,3500,pune
203,kumar,5000,hyd
203,kumar,6000,hyd
i want the o/p like this
in one target
201,raju,5000,hyd
202,ram,4000,hyd
and in second target
101,vamshi,5000,hyd
101,vamshi,5020,hyd
203,kumar,3500,pune
203,kumar,3500,pune
203,kumar,5000,hyd
203,kumar,6000,hyd
Answers were Sorted based on User's Feedback
After SQ Take Aggr group by empid and create a variable port Rows_count=count(1)
Take a router after aggr and create two groups one for uniqe and one for duplicate
in uniqe condition = Rows_count=1
duplicate group condition= Rows_count>1
connect unique group to tgt1
connect duplicate group to java transformation---
add following codes
for (int i=0;i<count;i++)
{
o_empid=i_empid;
o_ename=i_ename;
o_loc=i_loc;
o_sal=i_sal;
generateRow();
}
connect java transformation to tgt2
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / isha
Actually this question is - If any record have duplicate value then put it in T1 and If count is 1 then put in T2.
We have to use aggregator and have to group records based on empid and name
If count(empid) > 1 then T2
If count(empid) =1 then T1
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / abhishek guddu
src->sq->aggregator->router->target1
|->target2
AggregatorT/F
EMPID -> (GROUP BY)
O_COUNTID(EMPID)-OUTPUT PORT
<- COUNT(EMPID)> 1
ROUTER T/F
GROUP
ONE - CONDITION-> 0_COUNTID ->TARGET1(SECOND TARGET)
DEFAULT->TARGET2(TWO TARGET)
ONE GROUP RETURN DUPLICATE EMPID AND DEFAULT WILL UNIQUE.
| Is This Answer Correct ? | 6 Yes | 7 No |
Answer / sivakumar
SQ-->EXP-->ROUTER-->TRg
EMPID
IN_EMPID
in exp t/r
create variable port v_flag in that write the following condition
IIF(EMPID = IN_EMPID ,'1','0')
in router develop 2 conditions for v_flag
the values in the true will b directed to one output which we get the duplicated values
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / chiky
sq-->router--target1
|__target2
in router create one group and another default
coundition : decode(empid,201,true,decode
(empid,202,true,false))
connect group one in target table one
connect default in target table two
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / redflower
src->sq->exp->router->trg1
->trg2
create one variable port and write the substr() function
ename like k% is goes to one trg and remaining records goes
to another trg by using router t/r
| Is This Answer Correct ? | 2 Yes | 4 No |
Answer / ramesh
target1
SQ->Router->
target2
1.In router create one group and specity
the condition empid=201 or empid=202.
2.It is connected to target1.
3.Default group is connected to target2.
Thanks & Regards
Ramesh
| Is This Answer Correct ? | 2 Yes | 5 No |
What are the issues that you have faced while moving your project from the Test Environment to the Production Environment? Please explain in depth thanks in advance
we have a parameter file in Unix location where we have .txt files and those file will be used as source in informatica. I cannot use source file name directly as file name will keep on changing in unix location. I need to define $$InputFile as parameter. Can anybody send me the parameter file and the steps to handle this.
Hi, What is exactly node ? what is exactly domain ? How loadbalancer will work ? what is Integration service (IS) ? Can anyone give me exact scenario when I click on start workflow in the workflow manager ? (Note : I am not expecting answer like, node means logical representation of a machine and domain will contain multiple nodes .I gone through Informatica help but I couldn’t understand. I am expecting exactly what is happening in background detailed explanation or Pictorial representation will be highly appreciation ) Advance thanks
what is shortcut in informatica? difference between shortcut,reusable object?
What is Data Caches size?
After a load is done to my target table, I need to insert a last row, which might be formed at some expression transformation and brought to target. Do I have to have separate mapping to be run after the 1st mapping? Or in a single mapping how to achieve this?
how lookup is acting as both active and passive ? how is it possitble?
Hi experts, table 1 has 10 records, table 2 has 5 records select * from table1, table2; What is the output for this query???....plz answer
why do u use shortcuts in informatica.?
why dimenstion tables are denormalized in nature ?
How to write a procedure for a date which is in three different formats,and you want to load into datawarehouse in any single date formate
I have the source like col1 col2 a l b p a m a n b q x y How to get the target data like below col1 col2 a l,m,n b p,q x y