Best approach for history retention in SSIS ETL

I am looking for advise what would be the best approach for storing history of ETL load. The way ETL works is I am receiving flat file and it is loaded to staging area and from staging area to a production table and to a view
What would be the best approach in case I got duplicate file and load it I do not want that to happen
Thanks
Robert
robertfl77Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

zephyr_hex (Megan)DeveloperCommented:
If you want to prevent a duplicate file load, you need a unique way to identify the file.  How would you know it's a duplicate?  Does the file have a unique name?  Or time stamp?  Or column with a unique id ?
0
robertfl77Author Commented:
Actually there is no unique field in a data that is being provided, execept filename
0
zephyr_hex (Megan)DeveloperCommented:
If the filename is unique, you can track previously loaded filenames before inserting the new file.  So, for example, add a column to your table for the filename.  Before you load a new file, check and see if any records exist with the filename equal to the filename you're about to load.  If you find at least one, you know the file has been previously loaded and you should not load it again.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SSIS

From novice to tech pro — start learning today.