SQLTeam.com | Weblogs | Forums

Reading in files in ssis


#1

Hi

I was wondering if its possible to read in 2 different files structures. I have a package that reads in a text file but there has been changes made to the text file.(they have added in two extra columns) and i was wondering its its possible to set it up so that i can read both files in. so one day it could be the original file and the next it might be the new file with the extra columns


#2

sure you can. I'd have a generic file connection manager that only reads one column, then a conditional split to send it one way or another, followed by a derived column or script transformation to split up the row into the various columns.


#3

hi
thanks for reply. would u have an example or a good tutorial you found for this cant really find what im looking for in google. maybe im looking up wrong thing


#4

I can't think of a specific tutorial for this situation. The courses on PluralSight by Stacia Misner for SSIS are particularly good. If you're not a subscriber you can use it free for a month, I believe.


#5

ok thanks.

does it matter what coulmn you picked. what went into the conditional split and the derived columns


#6

sure it matters! You need to pick a column that definitely tells you the type of record you have.


#7

but the file has 10 columns so i have to read them all in. will it not fail there straight away if a file has 12 columns


#8

Read them in as one column, call it "data". in your conditional split, you need to examine something in the row to figure out