January 13, 2016 at 2:34 am
Hi,
I have come across situation where I need to load sql table from multiple flat files, I have created SSIS package with Data flow task, For Eachloop Container and File System Task.But now I got two flat files which has one extra column and one column missing in another flat file, how to handle this scenario. Could some help me.
Thank you
January 13, 2016 at 2:37 am
Use the data manipulation tools in SSIS to remove columns you do not need, or to add extra columns with default values; then combine the results.
January 13, 2016 at 5:20 pm
Sangeeth878787 (1/13/2016)
Hi,I have come across situation where I need to load sql table from multiple flat files, I have created SSIS package with Data flow task, For Eachloop Container and File System Task.But now I got two flat files which has one extra column and one column missing in another flat file, how to handle this scenario. Could some help me.
Thank you
As Hugo mentioned, one way is to pre-process the files so they all conform to the same format before you try to load them.
Since a Flat File Connection Manager wants to process a specific file format another option is to setup multiple Data Flow Tasks, one that can process each type of file. In your Foreach Loop Container can you know the format from the file name? If not, then you can determine the format using a Script Task. Once you know the format Precedence Constraints can ensure only the relevant Data Flow Task for the file format processes the incoming file.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply