Working With the Foreach Loop Container - Iterating Through Files in a Folder -
view details Often we need to load data that is in text files (also called flat files) and insert their rows into a table. This video talks about using the Foreach Loop Container and the Foreach File Enumerator along with user variables to loop through each file in a given folder.
This video helps you create an SSIS package that takes every file in a folder and loads the data into a SQL Server table.
Highlights from this video:- Traversing subfolders using the Foreach Loop Container
- Avoiding the use of ActiveX Script or the Script Task in favor of using the native SSIS tasks for iteration (no more scripting!)
- Using the Script Tas k to report the filename (fully qualified and/or the file name only)
- Creating variables and assigning variables in the Foreach Loop Container
- How to use masks to determine which files in a given directory to load
- Only load .txt files
- Only load files that begin with Employees_ and end in .dat (i.e., Employees_2006.dat or Employees_NewYork.data but not Customers_2006.dat)
- Using Connection Managers with Expressions to assign connection strings based on the Foreach Loop Container's variable assignment
and much more
To download this video,
Login, then visit the video's
detail page and click "download". You might wish to view our
free database videos.
Note: You must have the TSCC codec installed to view this video
Keywords Associated with this video: iterating, recursively, recursion, looping, loops, FileSystemObject, FSO, objFSO, MoveNext, VBScript