PDA

View Full Version : Fixed File Format Question



kettle_wconroy
04-26-2006, 11:38 AM
I have a file that has a fixed format for a row depending on the first 2 characters in the row.


but in one file, there are several different formats. Is there an easy way to process this sort of file?



My only idea was to have an input step that reads from the input file, then splits the rows into several files each having only rows with the same format. Once that is done, then I could just define an input file step per newly created file. Is there a way to have a single transform that does this? Can you have an input step that does not try to read from a file until a previous step is totally finished?



Or is there a better way to parse fixed fields from a line specify a format at a row level?



Thanks,



Bo

MattCasters
04-26-2006, 11:45 AM
Hi,

Sorry, but like I mentioned before on this forum, this is not yet possible.
At the moment the workaround is to read the file multiple times and work with filters.

All the best,

Matt

kettle_wconroy
04-26-2006, 12:46 PM
But since that is a fixed format, I dont think I can do that. each row has a potentially a different number of characters and is not delimited.

Is there a step that just does like a join and waits for all previous steps to complete?

MattCasters
04-26-2006, 12:57 PM
Hi William,

There is no "order" defined in a transformation. All steps start at once and a step only finishes processing when all previous steps have finished.

If you really need to have parts of transformation executed one after another, you need to use a temporary (staging) table and split the transformation in 2 or more parts. Sometimes there is just no way around that.

HTH,
Matt