Today I got a query asking me if we can have a script component which reads data from a text file which is supposed to have 5 input columns. However the data that they receive has at time extra columns or less columns for certain records. So the question arises how do we go about this.
There are 3 ways that come to my mind straight away.
- Script Component
- Flat file source which reads all data into one column and then splits them based on index of the comma in a derived column
- Flat file source with delimited settings to read just 5 columns.