I need help validating multiple excel files prior to loading them in a final database. First, I would like to check for NULLs, make sure that a threshold criteria is met (60%); if criteria is below
60%, send out a mail notification (file rejected) and if 60% and up, send mail notification (file passed). Below is a sample test data for clarity. In this sample data, the following are the validation criteria
1) ID cannot be NULL (create a new column that flags NULL)
2)If ((count of ID) *100)/count (*) < 60 then send error notification and reject file
3) If ((count of ID) *100)/count (*) > 60 then move file to final destination (and send a success message)
INPUT file 1
ID Name
1 John
2 Dave
Jonny
Kevin
David
Input file 2
ID Name
100 Jack
200 Jill
300 Naomi
400 Tim
Sample staging data
INPUT file 1 (This should be rejected because it fails to meet the 60 percent mark)
ID Name NULL_flag Percent
1 John N 40
2 Dave N 40
Jonny Y 40
Kevin Y 40
David Y 40
Input file 2 (This should pass because it is above 60 and hence be moved to final destination table)
ID Name NULL_flag Percent
100 Jack N 100
200 Jill N 100
300 Naomi N 100
400 Tim N 100
I'll appreciate feedback in regards to this SSIS task that I'm working on. Thanks