Posted: 9/2/2010
Hi Friends, Pls solve my following query with example. now i am doing project using ssis 2005. in that 1. import data from multiple resources like .xls, .xml,db 2.Read only file path from created meta data table like dil_table_met (Filetype=.xls,filepath=c:\..) 3.In that meta table, i want to read only file path and check file path which filetype like .xls or .xml and then import to excel source and to db destination , the same via for all file type 4. next read data from resources import correct data into correct table and wrong data into error table 5.for all these above condition are in loop. pls give a example for this its very urgent pls pls help me out for this
My recomendation would be to make a separate data flow for each of the different files. If you have 3 different formatted Excel sheets then you would need 3 data flows. Unfortunately SSIS is very rigid in the data flow area. The next thing I would do it create an Execute SQL Task to read from that table that stores the file name and location. Read in the FileType and the FilePath and store the whole result set in an Object variable. From there you would use a ForEach loop to loop over that result set. Inside your ForEach loop would be each of your data flows. You would need to set up expressions on a precedence constraint that would say @FileType == ".xlsx" or @FileType == ".xml" etc. From there you just need to set up expressions on your connection managers to bring in the file name as the connection string or file location depending on what type of connection it happens to be. Your data flows will have to be already set up as I already mentioned. Below is a screenshot of how I would set that up. Obviously you would need to make some adjustments based on your particular situation, but that would be my general idea.
Very Very Thanks BradSchacht,
Could pls create above package and give me a each and and evry step for this above package.
i am really sorry for again disturb u, am new for this ssis, pls send me in detail. so i can easily develop my project
thnks
Hi pls create small sample project for my above task and send to me with screen shots for all steps
pls help me my dear friend, because tomorrow is the last date for finish my project so send to me
vinoth
Sounds you like you need to contact sales@pragmaticworks.com. We offer consulting services involving any kind of SSIS package development.
This post reminds me of the old saying... "Give a man a fish, you fed him for the day...Teach the man how to fish, you fed him for a lifetime" or something like that.
I would agree! It sounds like he needs outside assistance. Forums are great for answering questions that can be answered in an easy fashion and they can be a great learning tool. When it crosses over the border for doing the work for those asking a question it becomes a job and the requester doesn't typically learn much from it. I believe that Brad has answered the question in great detail and hopefully others can use what he has provided to create their own solutions. If they are unable to, outside consulting could help them. Or possibly some SSIS training. Pragmatic Works also offers that if you want to LEARN how to fish instead of someone feeding you for the day.
Right on, Brian.