Actually, there are total 4 tables invoked in this mapping: Market,Cost, A, B,
Read_sourceTB_B-----FIL1------->---------JNR4 \
| | |
| Read_sourceTB_Market--\ | |
| Read_sourceTB_Cost------JNR1--\ | |
| Read_sourceTB_A-----------------JNR2 JNR5--->EXP... -->TGT
| | | |
| | | |
| | | |
---------------------FIL2->---------JNR3 /
SQ_TABLEB --FIL1-> -- JNR1 \
| | |
| SQ_TABLEA --| JNR3-->EXP.... -->TGT
| | |
|--FIL2-> -- JNR2 /
**First **joinning condition
A LEFT JOIN B
ON A.MEMBERSHIPID = B.MEMBERSHIPID
Where B.System_Code='University'
IF <First joinning condition> failed, then execute
**Second **joinning condition
A LEFT JOIN B ON
A.address = B.address and A.phonenumber = B.phonenumber
Where B.System_Code='Policy'
Which transformation should I use? I don't know how to use Informatica, my version is Informatica Developer 10.5, please help me.Thanks!
I only know how to
A left join B on `condition` `System_Code='University'`
left join B on `condition` `System_Code='Policy'`
but I don't know how to make a decision for
if A join B System_Code='University'
failed,
then A join B System_Code='Policy'
You need to join A with B (twice) based on two different condition and then join them back to one single pipeline for a decision/if-else condition. Also please note, all your left joins are actually inner join because you are using
B.xxx='something'
condition in thewhere
clause.So, considering above problem -
After source qualified of B, add two filters FIL1(system_Code='University') and FIL2(System_Code='Policy') in parallel.
Then use JNR1 to join A and B(FIL1) using JOINER on A.MEMBERSHIPID = B_F1.MEMBERSHIPID. Use A as detail table and use 'inner join'.
Then join A and B(FIL2) using JOINER(JNR2) on A.address = B_F2.address and A.phonenumber = B_F2.phonenumber. Use A as detail table and use 'inner join'.
Then join above two pipelines into one single pipeline using another Joiner(JNR3). It should be normal join and join should be primary key from table A. Get all required columns.
(EXP)Then use an expression transformation. Use logic similar to below.
Whole mapping should look like this -
But i think your requirement may be like this -
if yes, then change the
inner join
tomaster outer join
in the JNR1 and JNR2.