http://www.megaupload.com/?d=8P9DALO1 Informatica videos.rar
http://www.megaupload.com/?d=1ENC9B7T Informatica 8.1 FULL.rar
http://www.megaupload.com/?d=CEL1IR82 Webex.rar
http://www.megaupload.com/?d=492HNS59 Sales_sources.rar
Sunday, 9 January 2011
Friday, 7 January 2011
I have a scenario like - how can i load 1st record to Trgt1,2nd-Trgt2, 3rd->Trgt3 and again the cycle has to repeat with loading 4th-Trgt1,5th->Trgt2,6th->Trgt3?Take a sequence generator with Start Value=1,Current Value=1,End Value=3, Increment By=1 to assign a seqno to each row. Do not forget to enable the cycle option.after that take a Router with three groups of seqno=1,seqno=2 and seqno=3.
Lets say i have more then have record in source table and i have 3 destination table A,B,C. I have to insert first 1 to 10 record 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 upto last record.SOLUTION:
Generate sequence number using informatica, add filter or router transformations and define the conditions accordingly…
Define group condition as follows under router groups….
Group1 = mod(seq_number,30) >= 1 and mod(seq_number,30) <= 10
Group2 = mod(seq_number,30) >= 11 and mod(seq_number,30) <= 20
Group3 = (mod(seq_number,30) >=21 and mod(seq_number,30) <= 29 ) or mod(seq_number,30) = 0
Group2 = mod(seq_number,30) >= 11 and mod(seq_number,30) <= 20
Group3 = (mod(seq_number,30) >=21 and mod(seq_number,30) <= 29 ) or mod(seq_number,30) = 0
Connect Group1 to A, Group2 to B and Group3 to C
We have a target source table containing 3 columns : Col1, Col2 and Col3. There is only 1 row in the table as follows:(without using Normalizer)
Col1 Col2 Col3
-----------------
a b c
There is target table containg only 1 column Col. Design a mapping so that the target table contains 3 rows as follows:
Col
-----
a
b
c
Solution: Not using a Normalizer transformation:
Create 3 expression transformations exp_1,exp_2 and exp_3 with 1 port each. Connect col1 from Source Qualifier to port in exp_1.Connect col2 from Source Qualifier to port in exp_2.Connect col3 from source qualifier to port in exp_3. Make 3 instances of the target. Connect port from exp_1 to target_1. Connect port from exp_2 to target_2 and connect port from exp_3 to target_3.
Col1 Col2 Col3
-----------------
a b c
There is target table containg only 1 column Col. Design a mapping so that the target table contains 3 rows as follows:
Col
-----
a
b
c
Solution: Not using a Normalizer transformation:
Create 3 expression transformations exp_1,exp_2 and exp_3 with 1 port each. Connect col1 from Source Qualifier to port in exp_1.Connect col2 from Source Qualifier to port in exp_2.Connect col3 from source qualifier to port in exp_3. Make 3 instances of the target. Connect port from exp_1 to target_1. Connect port from exp_2 to target_2 and connect port from exp_3 to target_3.
There is a source table that contains duplicate rows.Design a mapping to load all the unique rows in 1 target while all the duplicate rows (only 1 occurence) in another target.
Solution :
Bring all the columns from source qualifier to an Aggregator transformation. Check group by on the key column. Create a new output port count_col in aggregator transformation and write an expression count(key_column). Make a router transformation with 2 groups:Dup and Non-Dup. Check the router conditions count_col>1 in Dup group while count_col=1 in Non-dup group. Load these 2 groups in different targets.
Solution :
Bring all the columns from source qualifier to an Aggregator transformation. Check group by on the key column. Create a new output port count_col in aggregator transformation and write an expression count(key_column). Make a router transformation with 2 groups:Dup and Non-Dup. Check the router conditions count_col>1 in Dup group while count_col=1 in Non-dup group. Load these 2 groups in different targets.
Design an Informatica mapping to load first half records to 1 target while other half records to a separate target.
Solution:
You will have to assign a row number with each record. To achieve this, either use Oracle's psudo column rownum in Source Qualifier query or use NEXTVAL port of a Sequence generator. Lets name this column as rownumber.
From Source Qualifier, create 2 pipelines:
First Pipeline:
Carry first port Col1 from SQ transformation into an aggregator transformation. Create a new output port "tot_rec" and give the expression as COUNT(Col1). Do not group by any port. This will give us the total number of records in Source Table. Carry this port tot_rec to an Expression Transformation. Add another port DUMMY in expression transformation with default value 1.
Second Pipeline:from SQ transformation, carry all the ports(including an additional port rownumber generated by rownum or sequence generator) to an Expression Transformation. Add another port DUMMY in expression transformation with default value 1.
Join these 2 pipelines with a Joiner Transformation on common port DUMMY. carry all the source table ports and 2 additional ports tot_rec and rownumber to a router transformation. Add 2 groups in Router : FIRST_HALF and SECOND_HALF. Give condition rownumber<=tot_rec/2 in FIRST_HALF. Give condition rownumber>tot_rec/2 in SECOND_HALF. Connect the 2 groups to 2 different targets.
Solution:
You will have to assign a row number with each record. To achieve this, either use Oracle's psudo column rownum in Source Qualifier query or use NEXTVAL port of a Sequence generator. Lets name this column as rownumber.
From Source Qualifier, create 2 pipelines:
First Pipeline:
Carry first port Col1 from SQ transformation into an aggregator transformation. Create a new output port "tot_rec" and give the expression as COUNT(Col1). Do not group by any port. This will give us the total number of records in Source Table. Carry this port tot_rec to an Expression Transformation. Add another port DUMMY in expression transformation with default value 1.
Second Pipeline:from SQ transformation, carry all the ports(including an additional port rownumber generated by rownum or sequence generator) to an Expression Transformation. Add another port DUMMY in expression transformation with default value 1.
Join these 2 pipelines with a Joiner Transformation on common port DUMMY. carry all the source table ports and 2 additional ports tot_rec and rownumber to a router transformation. Add 2 groups in Router : FIRST_HALF and SECOND_HALF. Give condition rownumber<=tot_rec/2 in FIRST_HALF. Give condition rownumber>tot_rec/2 in SECOND_HALF. Connect the 2 groups to 2 different targets.
Subscribe to:
Posts (Atom)