Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How can the following be achieved in 1 single Informatica
Mapping.

* If the Header table record has error value(NULL) then
those records and the corresponding child records in the
SUBHEAD and DETAIL tables should also not be loaded into
the target(TARGET1,TARGET 2 or TARGET3).

* If the HEADER table record is valid, but the SUBHEAD or
DETAIL table record has an error value (NULL) then the no
data should be loaded into the target TARGET1,TARGET 2 or
TARGET3.

* If the HEADER table record is valid and the SUBHEAD or
DETAIL table record also has valid records only then the
data should be loaded into the target TARGET1,TARGET 2 and
TARGET3.

===================================================
HEADER
COL1 COL2 COL3 COL5 COL6
1 ABC NULL NULL CITY1
2 XYZ 456 TUBE CITY2
3 GTD 564 PIN CITY3

SUBHEAD
COL1 COL2 COL3 COL5 COL6
1 1001 VAL3 748 543
1 1002 VAL4 33 22
1 1003 VAL6 23 11
2 2001 AAP1 334 443
2 2002 AAP2 44 22
3 3001 RAD2 NULL 33
3 3002 RAD3 NULL 234
3 3003 RAD4 83 31

DETAIL
COL1 COL2 COL3 COL5 COL6
1 D001 TXX2 748 543
1 D002 TXX3 33 22
1 D003 TXX4 23 11
2 D001 PXX2 56 224
2 D002 PXX3 666 332
========================================================

TARGET1
2 XYZ 456 TUBE CITY2

TARGET2
2 2001 AAP1 334 443
2 2002 AAP2 44 22

TARGET3
2 D001 PXX2 56 224
2 D002 PXX3 666 332

Answers were Sorted based on User's Feedback



How can the following be achieved in 1 single Informatica Mapping. * If the Header table record ..

Answer / vinithra

Hi,
This could be implemented in many ways.One such way is :

Assumption : All the 3 tables namely HEADER,SUBHEAD and
DETAIL belong to the same Database

Solution : In the Source Qualifier for HEADER , wrie a
query which will select COL1 from all HEADER table which
has valid values in all 3 tables.The query would look like :
SELECT H.COL1
FROM
HEADER H
INNER JOIN
SUBHEAD S
ON
H.COL1=S.COL1
AND
H.COL2 IS NOT NULL AND H.COL3 IS NOT NULL AND H.COL5 IS NOT
NULL AND H.COL6 IS NOT NULL AND
S.COL2 IS NOT NULL AND S.COL3 IS NOT NULL AND S.COL5 IS NOT
NULL AND S.COL6 IS NOT NULL

INNER JOIN
DETAIL D
ON
H.COL1=D.COL1
AND
D.COL2 IS NOT NULL AND D.COL3 IS NOT NULL AND D.COL5 IS NOT
NULL AND D.COL6 IS NOT NULL
i.e the above query will fetch the value 2 .Insert this to
a flat file.

Then in the same mapping , DO the following:
HEADER Source Qualifier -> Lookup on the flat File such
that HEADER.COL1=FlatFile.COL1->Insert the valid records in
Target (records which do not return NULL from the lookup)
Here only record with COL1=2 will be inserted into the
Target
Repeat the same for SUBHEAD->Target2 and DETAIL->Target3 in
the same mapping.

Please let me know if i am wrong.
Thanks Vinithra.

Is This Answer Correct ?    5 Yes 0 No

How can the following be achieved in 1 single Informatica Mapping. * If the Header table record ..

Answer / anu

1)In the mapping join all the 3 flat files on the common
column(Col1).(2joiners are needed)
2)Create a expression drag all the columns from the end
Joiner to Exp.In the expression create a 3 ports
H_flag,S_Flag,D_flag.

H_Flag =iff(isnull(col2),'x',iff(isnull(col3),'x',iff(isnull
(col5),'x',iff(isnull(col6),'x','y'))
the result of this is if you have null in any header column
this flag value will be 'X'.
Repeat this with Detail and subhead as well.
Declare these flag ports as last ports of expression.
3)Create a router with a group in it for
H_Flag!='x'
S_flag!='x'
D_Flag!='x'
This will get you not null columns from all the three and
accordingly u can load the target.

But if you have any other conditions ,still you can use
these flags in filters and control the data flow.

Is This Answer Correct ?    4 Yes 0 No

How can the following be achieved in 1 single Informatica Mapping. * If the Header table record ..

Answer / ahmed

Hi Vinithra,

I dont think while using Flaat file as source we can edit
SQL over ride option and write the above mention query.

Ahmed

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More Informatica Interview Questions

What are slowly changing dimensions?

5 Answers   Informatica, Verinon Technology Solutions,


1) Alternative to update strategy transformation 2) out of 1000 records after loading 200 records, the session got failed. how do u load the rest of records ?? 3) use of lookup override

3 Answers   IBM,


What is informatica? What exactly are the practical uses in real world

2 Answers  


Update strategy transformation is an active transformation.How it changes the number of records that pass through it? Please explain....

2 Answers  


How You Pull the records on daily basis into your ETL Server.

2 Answers   TCS,


Explain incremental aggregation in informatica

0 Answers   Informatica,


Is it possible to define a single node as a Gateway node as well as worker node?

0 Answers  


What are the circumstances that infromatica server results an unreciverable session?

1 Answers  


when we use dynamic lookup,if condition matches what will be the o/p?

2 Answers   L&T,


-Which expression we can not use in Maplets?, -Can we join(relate) two dimensions in a schema? -Why and where we use 'sorted input' option?

1 Answers   TCS,


is it reqire primary key and foreign key relation ship to join relational databases?if yes? explain?

3 Answers   IBM,


Where can we find the throughput option in informatica?

0 Answers  


Categories