You are going to need to loop over the files
You will then need to set the DataSource property of the Text File source to the file
You will need to set the DestinationObjectName of the DataPump task to the correct table (How will you know the file for the table
mapping?)
You then need to tear down any transformations
Then you need to rebuild the mappings dynamically.
Not a light task at all.
You could of course generate BULK INSERT statements dynamically as well using the infor from the looping over the files and maybe
reading a table to find out what text file goes where.
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - SQL Server 2005 Integration Services.
www.Konesans.com
"dataguy" <barry_noble (AT) progressive (DOT) com> wrote
Quote:
I have a situation where I have 600 text files that I need to input to
600 tables. Each of the text files relates to one and only one table.
What I would like to be able to do is to setup a generic DTS package
that I could pass the table name and the input text file name to it to
do the import. Does anyone have any suggestions on how to do this?
I'm stumped at how to generically do the transformation part. |