Page 1 of 1

Input files with multiple record types

Posted: Tue Jan 29, 2008 4:52 am
by paweljanowski
Hi!
Sorry for this probably stupid question, but what is the easiest way to read data from files with multiple record types. I'd like to read the file (which is tab delimited itself) and the according to the value of the first field pass the input data (record) to separate link. I've planned to use the Sequential File stage to read the data, but the records inside vary in number of columns (and their types, but this is less important) - some of them contain 6 fields and the longest one contains 64.

Thanx in advance.

Regards,

Pawel Janowski

Posted: Tue Jan 29, 2008 7:52 am
by chulett
Read it as one long varchar column, then parse out the first column (with FIELD more than likely) and take it from there based on that value.

Posted: Tue Jan 29, 2008 8:02 am
by asitagrawal
If you know the maximum number of columns..then specify all those on the columns and select Retain for the Incomplete Column. This you can set in the Columns tab of Output properties for the stage.

So, Depending on the value of the first column, route the data to the desired links..

Posted: Tue Jan 29, 2008 9:00 am
by paweljanowski
Thx. :D

Pawel Janowski