Load flat files with different number of columns into tables that bear the file names
Hello All,
I have a situation where I need to load a bunch of csv files all from the same folder into tables that have the same name as the source files. The main problem though is that the no of fields in the files vary. Can this be achieved using a single package?
December 21st, 2010 11:59am
Yes you can do it in a package but it will all be in a script task as you can't have dynamic meta data.
Free Windows Admin Tool Kit Click here and download it now
December 21st, 2010 12:03pm
Hi 1unique,
Since the metadata is different in each source file, we are not able to use the Data Flow Task to import the data to SQL Server tables directly.
As a workaround, please use the BCP utility instead. Below is a similar thread for your reference:
http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/6192eaba-b941-4f8f-86bd-f32a5e6be76f/
For more information about BCP utility, please see:
http://msdn.microsoft.com/en-us/library/ms162802.aspx
If you have any more questions, please feel free to ask.
Thanks,
Jin ChenJin Chen - MSFT
December 22nd, 2010 10:00pm
Hi 1unique,
Since the metadata is different in each source file, we are not able to use the Data Flow Task to import the data to SQL Server tables directly.
As a workaround, please use the BCP utility instead. Below is a similar thread for your reference:
http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/6192eaba-b941-4f8f-86bd-f32a5e6be76f/
For more information about BCP utility, please see:
http://msdn.microsoft.com/en-us/library/ms162802.aspx
If you have any more questions, please feel free to ask.
Thanks,
Jin ChenJin Chen - MSFT
Free Windows Admin Tool Kit Click here and download it now
December 22nd, 2010 10:00pm