Download Package
ArchiveAndRename.dtsx
If one of the task in your SSIS package is to move the source text files to an archive folder after its processed then this can be done through the script task in SSIS.
Steps involved :
- create a variable in SSIS package : right click anywhere in your package and click on variables --> create a variable as "vFileName" with string as datatype
- Create a text file connection with the path to connect the source text file --> define the columns ( the connection path will disappear once its executed as it will use the expressions for connection string in next step)
- ssis create expressions for connection in ssis : right click on text file in the connections area --> click on properties --> click on expressions --> select the user::variable in the left pane --> select "connection string" at the right pane --> click "Ok"
- Drag the "foreach loop container" --> right click -->; click on properties --> click on variable --> select "vFileName"
- Drag a dataflow or any other transformations to process the text file ( here this package is using a dummy dataflow)
- Last task is to archive the source file using a "script task" to a different folder called ARCHIVE and rename the filename with date.
can i have the similar frameworks
ReplyDeleteSuch a simple, elegant solution. This is great.
ReplyDeleteThanks for one's marvelous posting! I definitely enjoyed reading it, you might be a great author.I will make certain to bookmark your blog and will often come back very soon. I want to encourage you to definitely
ReplyDeletecontinue your great posts, have a nice weekend!
I am really pleased to glance at this website posts which contains plenty of helpful
ReplyDeleteinformation, thanks for providing these data.
Hey very interesting blog!
ReplyDeleteThanks for the tips guys. They were all great. I have been having issues with being fat both mentally and physically. Thanks to you guys i have been showing improvements. Do post more.Protective fabrics
ReplyDeleteThanks for the tips guys. They were all great. I have been having issues with being fat both mentally and physically. Thanks to you guys i have been showing improvements. Do post more.Protective fabrics
ReplyDelete