There are 2 files, Master and User. We need to compare 2
files and prepare a output log file which lists out missing
Rolename for each UserName between Master and User file.

Please find the sample data-

MASTER.csv
----------
Org|Tmp_UsrID|ShortMark|Rolename
---|---------|----------|------------
AUS|0_ABC_PW |ABC PW |ABC Admin PW
AUS|0_ABC_PW |ABC PW |MT Deny all
GBR|0_EDT_SEC|CR Edit |Editor
GBR|0_EDT_SEC|CR Edit |SEC MT103
GBR|0_EDT_SEC|CR Edit |AB User




USER.csv
--------
Org|UserName|ShortMark|Rolename
---|--------|---------|------------
AUS|charls |ABC PW |ABC Admin PW
AUS|amudha |ABC PW |MT Deny all
GBR|sandya |CR Edit |Editor
GBR|sandya |CR Edit |SEC MT103
GBR|sandya |CR Edit |AB User
GBR|sarkar |CR Edit |Editor
GBR|sarkar |CR Edit |SEC MT103


Required Output file:
---------------------
Org|Tmp_UsrID|UserName|Rolename |Code
---|---------|--------|------------|--------
AUS|0_ABC_PW |charls |ABC Admin PW|MATCH
AUS|0_ABC_PW |charls |MT Deny all |MISSING
AUS|0_ABC_PW |amudha |ABC Admin PW|MISSING
AUS|0_ABC_PW |amudha |MT Deny all |MATCH
GBR|0_EDT_SEC|sandya |Editor |MATCH
GBR|0_EDT_SEC|sandya |SEC MT103 |MATCH
GBR|0_EDT_SEC|sandya |AB User |MATCH
GBR|0_EDT_SEC|sarkar |Editor |MATCH
GBR|0_EDT_SEC|sarkar |SEC MT103 |MATCH
GBR|0_EDT_SEC|sarkar |AB User |MISSING

Both the files are mapped through Organization, Shor_mark.
So, based on each Organization, Short_Mark, for each
UserName from User.csv, we need to find the Matching and
Missing Rolename. I am able to bring Matching records in
the output. But really I don't find any concept or logic to
achieve "MISSING" records which are present in Master and
not in User.csv for each UserName. Please help out guys.
Let me know if you need any more information.

Note:- In User.csv file, there are n number of
Organization, under which n number Shortmark comes which
has n number of UserName.

Answer Posted / zer0

Create the mapping as below:
LKPTRANS
Master_SQ /\
\ / \
/JNRTRANS ---> EXP1 ---> AGG ---> EXP2 ----> EXP3 ---> Targ
User_SQ

In Joiner, use the join as per requirement. For the
scenario given a normal join is enough. Take all the ports
from Master_SQ and User_SQ into an expression after joiner.
From Expression pass it on to an aggregator. In aggregator,
group by based on the ports Master.ShortMark,
Master.Rolename and Master.Username .
From aggregator take the following ports - Master.Org,
Master.Tmp_UsrID, Master.ShortMark, Master.Rolename and
User.UserName
Make a lookup on the User.csv file and from Expression take
Master.ShortMark, Master.Rolename and User.UserName as
input into the lookup trans. Join on the basis of the input
ports and output LKP_UserName from the lookup
transformation.
Also, from EXP2 take all the ports as input into EXP3. Make
a CODE column in EXP3 with the condition IIF(ISNULL
(LKP_UserName),'MISSING','MATCHING')

From EXP3 pass all the ports into target. You will have
your desired answer.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between reusable transformation and mapplet.

568


Explain the difference between a data warehouse and a data mart?

594


How can we use mapping variables in informatica?

597


If the source has duplicate records as id and name columns, values: 1 a, 1 b, 1 c, 2 a, 2 b, the target should be loaded as 1 a+b+c or 1 a||b||c, what transformations should be used for this?

8534


What is update strategy transform?

567






I have done MBA in 2008. i got job as business analyst in 2008 january through consultany. but after 3 months they are giving training Informatica developer. now iam continuing this job. my question is when iam going to interview HR people ask me many times like this " YOU ARE MBA GRADUATE. HOW YOU ARE SELECT THIS POSTION. IAM EXPLAINING WHAT I HAVE MENTION ABOVE". PLEASE TELL HOW IAM TELLING THIS QUESTION ANSWER.

1627


The question was on time stamp. what is the difference between HH and HH24 when to use when.

1550


Explian the Process of deployment groups in informatica

653


suppose in my source flatfile i have 10000 records in that some of master table records missed table records missed then what will u do

1730


What are the designer tools for creating transformations?

675


Explain Dataware house architecture .how data flow from intial to end?

2120


Explain the features of connected and unconnected lookup.

540


What is pmcmd command?

670


What are the types of caches in lookup? Explain them.

547


Please let me know how to make Data masking in informatica..

1265