Let’s say I have more than have record in source table and I
have 3 destination table A,B,C. I have to insert first 1 to
10 records in A then 11 to 20 in B and 21 to 30 in C.
Then again from 31 to 40 in A, 41 to 50 in B and 51 to 60 in
C……So on up to last record.
Answers were Sorted based on User's Feedback
Answer / balachandar
step1).create a sequence generator set the properties
values as increment by=1,end value=30,check cycle and reset
properties.
step2).take the next val of seq generator into expression
transformation and rename it to some meaningfull name say
temp_id
step3).take a router transformation create 3 groups in say
first10,second10 and third10.
and conditions for the groups is as follows...
Tmp_Id >=1 and Tmp_Id<=10,
Tmp_Id >=11 and Tmp_Id<=20
Tmp_Id >=21 and Tmp_Id<=30
step4).connect the router transformation groups to the
respective targets.
| Is This Answer Correct ? | 20 Yes | 1 No |
Answer / ankit kansal
The above answer is work perfectly fine however if interviewer asks to do it with sequence then you can opt this approach.
1)Create a mapping variable of integer type and assign a default value of 30.
2)Mapping Design
SRC->SQ->EXP->ROUTER->TGT
3)EXPRESSION
in_rec i|o in_rec
count v IIF(count<=mapping_variable,count+1,0)
out_count o count
And then using the router route the records to different targets.
http://deepinopensource.blogspot.com/
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / varsha
Source->SQ_>Expression->Router-> Tgt 1,Tgt 2,Tgt 3
in router add three groups
group1:mod(SEQ_NUM,30) >=1 and mod(SEQ_NUM,30) <=10
group2:mod(SEQ_NUM,30) >=11 and mod(SEQ_NUM,30) <=20
group3:mod(SEQ_NUM,30) >=21 and mod(SEQ_NUM,30) <=29 or mod(SEQ_NUM,30)=0
and connect to the respective target
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / kumar
U can do it using Expression and RTR check the below link for more info.. and its has some other very good scenarios
https://etltechsolutions.wordpress.com/2014/10/15/informatica-scenario-split-source-records-and-loading-into-3-targets-based-on-some-logic/
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / nitin
Source->SQ_>Expression->Router-> Tgt 1,Tgt 2,Tgt 3
In the mapping define a variable Run_count of Aggregation type as count
in router add three groups.
Run_count = 1--> then connect the data to tgt 1
Run_Count = 2-->Tgt2
Run_Count = 3-->Tgt3
In the expression transformation add a condition IIF(Run_Count > 3,1,Run_count)
| Is This Answer Correct ? | 0 Yes | 1 No |
my source is like this id,name sal 10 abc 1000,10 pqr 2000, 10 xyz 3000 ,10 jkl 4000 and my requirement is like this 10 abc,pqr,xyz,jkl 2000 .... i have try for this by using expression transformatin its ok of the concatenation of second column but the thing is that on third column if u group by using agg t/r the last value will com i.e 4000 but i asked by a interviewer that i dont want the first or last column i want the middle column i.e 2000 .plz reply for the same
Hello, I have the below table: CityID CityName CostOfLiving 1 Mumbai 5000 1 Bangalore 4500 1 Chennai 4800 2 Vapi 6000 3 New Delhi 8000 I am passing the rows of the above table through the aggregator transformation in Informatica What happens in the following conditions: 1) I specify no group-by ports? 2) I specify a group-by on CityID without making any separate post for aggregation? Which city and costofliving will this eventually take for CityID=1? 3) Rest being same as point 2,I take the sum of cost of living.Which city will be returned for ID=1? Thanks for your help!
from Source 100 rows are coming, on target there are 5 m rows which options is better to match data 1. Joiner 2 No cache 3. Static 4. Dynamic
I have a source as flat file and having data like ""TCS"MUMBAI" and i want output like TCS MUMBAI,the length of the data in the rows is variable.how can you fix it?
Explain sql transformation in script mode examples in informatica
What are the challenges you have faced in your Project (DWH- ETL)? Explain with example?
what is work of PUSH DOWN option
if we hav 10 records in a file, can we get first record from it by using Aggregator with out using Groupby Port in it?If Yes..let me know the answer plz!!!
A Flat file located in unix source folder. data transfer every day 8 am. can ask 5 question for above scenario validation. recently i have faced this question.
how many new transformations are introduced in 8.1 which are not available in 7.1? any new transformation in 8.6?
2,can we insert duplicate data with dynamic look up cache,if yes than why and if no why?
How to create or import flat file definition in to the warehouse designer?