Search code examples
ssisssis-2012

SSIS Package - How to skip files that are already loaded


I've created an SSIS package from this tutorial and it mostly works perfectly for what I need > https://www.youtube.com/watch?v=B05WcIRFE1E

Obviously though it was never going to be perfect for my needs so I need to tweak it however I'm relatively new to this so not sure on next steps

I need it to check for the file, but I just need the package to ignore it if its loaded already, not load again, but leave the file there as other reports are using

The above tutorial loops through the files in a location, and checks if a file is already loaded according to a table log which holds names of files which has been loaded. However it then copies or moves the file to a location.

What can I do do resolve this. Not looking for someone to create it for me or do all my work! Just looking ideally for tutorials or previously answered questions if possible, just when I've looked I don't think I know how to pose the question to google to come up with the answer I need!

Obviously if you do know step by step, and have the time, I'd love a detailed answer!

Cheers all


Solution

  • I did not watch a 20 something minute video so if there's nuance, patch it into your question.

    At 18:33 the package looks like this

    enter image description here

    Check if the file has been loaded.

    If it has been, push it to the Rejected folder. That does not meet your business rules so remove it.

    If it has not been loaded, load it via a data flow task.

    Once loaded, archive the file. Remove that as it does not meet your business rules (extend the precedent constraint to the insert file name task

    Finally, log that the file has been processed.