Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 SSIS 2005 - Data Flow work to be done in a dynamic

Author  Topic 

suresh.msql
Starting Member

1 Post

Posted - 2011-01-24 : 20:31:02
Hi,

I am new to SSIS, I got a hectic requirement at the start itself. Please help me

My requirement is like

*I have 50 Flat files with different structure.
*Each flat file name is equals to data base table name. and first row of flat file is having the column names.
*I want to automate a process to pick the file and load data into the specific table.(I am creating the table dynamically using script task)

I have done all the table creation and all others.

Now i need to get the file using source and need to load the data into SQL SERVER dynamically to the respective table.

Can any one help me,what is the best of doing this dynamically.
1. i have tried with Scirpt component as source and transmission(to convert data) and destination. But failed to code it in dynamic way of columns. i am using SSIS 2005 so i have access to only VB.NET.
2. Setusagetype is not working in script component transformation.

Can any one guide me to right way to finish my task dynamically.

I want to pick the file from source, convert data (dt_str to dt_wstr) and load data to sql server. i have everything in variable (table name, file name...). Created a table structure with empty rows.

Please reply me as quick as possible.

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2011-01-24 : 21:04:23
You can't make the dataflow columns dynamic. Sorry..the metadata must stay constant.



Poor planning on your part does not constitute an emergency on my part.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-01-26 : 12:18:09
you can however implement this functionality using script task by creating a data flow task on the fly based on dynamic metadata of flat files

see sample code here

http://social.msdn.microsoft.com/forums/en-US/sqlintegrationservices/thread/a51468dc-ce67-4169-bebb-90c016036dd4/

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -