Hi guys,
I’m a WM newbie and I’m trying to read a plain text file from a flow.
The file is structured in the following way, where each line starts with and identifier of the row content.
ex.
ID1 = personal data
ID2 = address data
ID3 = other generic data
The file obviously contains several rows, and ID2, ID3 are optional.
ID1
ID2
ID3
ID1
ID2
ID1
ID2
I’d like to build a list of output file.
Is this possible via the standard WM flow? I’ve tried different options but can’t figure out how to read more file line in a loop or skip loop cycle…
I would recommend that you create a file schema which defines each record type in the file. You can then use the pub.flatFile.convertToValues service in a loop to iterate through the *ffdata file stream/bytes. This will automatically parse out the input structure into the records and fields as defined in the schema.
ops… I was using the fixed length format, while the file was a bunch of records in different rows separated by crlf… I’ve changed the type to delimited and it works!