February 7, 2014 at 2:39 am
multiple files with some columns are same and some columns are different but i have to load all this columns into single table which is having all columns how is it possible with ssis 2008 r2 by using single data flow
February 7, 2014 at 2:55 am
Can you please give some additional details like file structure etc ? If possible please sample post the i/p file data and the output that you are expecting ...
February 7, 2014 at 3:15 am
..load all this columns into single columns ...
Please explain what you mean by this.
In general, for every different file format, you will need a separate dataflow. Multiple files with the same format can use the same dataflow, often by using a FOREACH container to loop round those files.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
February 7, 2014 at 4:04 am
data in file1 like this id,name,add and in file2 like this id,name,add,unit,sold and file3 is id,nam...,but i have all columns in one single destination table.and i want load this all data into my single destination.
February 9, 2014 at 7:53 am
How many files are we talking about and also how many different layouts?
Multiple data flows (one per file type) is one way of handling this.
Another is to send all of the data to a script component and use that to handle the layout variations, in a single dataflow. In this case, your base file connection should define the entire row as a single string, to avoid any meta data issues between files.
Use a FOREACH container to iterate round the files (your dataflow will go in here).
If your C# is decent, the scripted option is likely to be tidier, in my opinion.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
February 9, 2014 at 7:11 pm
On the other hand, you could just use BULK INSERT pointed at different views that all point to the same table.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 9, 2014 at 9:32 pm
Hi,
Actually i have 10 files which have 30 columns common in all files,but some files having additional colums that may be 10 columns only ,but i have this 40 columns in my destination table so i want to load this all files in single package.And if it is possible with script component please send code.i think it is clear now ..common colums in all files like this id,dealer name,addderes,............. and additional columns in file 1 is agent,sales no,and additional column in file 2 is product,..and in final destination table columns are id,dealer name,adderess,agent,sales no,product,(this table is having all columns).
February 10, 2014 at 12:29 am
And if it is possible with script component please send code ...
It is possible, but I'm not going to write the code for you - unless you want to hire me as a consultant.
Please take the time to do some research and have a go yourself. If you have specific implementation problems, feel free to post back and we will try to help.
I can help with pseudo-code though:
Foreach File
Determine row format
Foreach row
Break row into columns based on row format
Assign columns to output columns
Next row
Next File
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
February 10, 2014 at 12:31 am
The above assumes that:
a) You have created appropriate output columns for your script component
b) That the script component is running in synchronous mode (one row in = one row out)
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply