I am new to Informatica and I am confused.
I have data from a flat file and need to do some transformation for it. I just need a general idea on how to actually do it.
Say I have data that looks like this:
COL1, COl2, COl3, COL4
A B C D
A B B B
G G G G
B D D X
F F F F
B B A D
1) I need to transfer only rows that have the first column as A or B
2) I need the count of the rows that are A, and I need a separate count that is B
3) I need a comparison of the count of A and the count of B. If the count do not match then I need an email sent.
Can someone give me a link to something helpful or tell me exactly that types of transformation / logic I should be using? Thanks
There are multiple ways. Here's a simple one, step-by-step.
Source Qualifier
to get just the data you need.Router Transformation
with two groups defined as COL1='A'
and COL1='B'
Aggregate Transformation
to get the counts (for each pipeline).Expression Transformaiton
to add a dummy port e.g. joinPort = 1
(for each pipeline).Joiner Transformation
Expression Transformation
to compare the results.Sending email a separate story.
Components tab
do the Pre-session variable assignment
and assign wfSendEmail to mSendEmail.SETVARIABLE
function if the counts do not match to set the mSendEmail to 1
.Components tab
do the Post-session variable assignment
and assign mSendEmail value to wfSendEmail.Email task
with a condition wfSendEmail=1
on the link from the session.