Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: mgajdosikIf the blocks are separated by two line feeds then you can use delimited node and use \n\n or \r\n\r\n as your record delimiter, for the field delimiter use something like @#$%^&*, which is not found within the file and then field name set for DATA.... This will read in every customer into single record, single field. From here you can add unique ID within filter, by having code like this:
id = execCount
emit *, id
Then your next node would be expand from list using \n as delimiter. Then you can split the DATA into NAME and VALUE by using another filter node and this code:
if DATA.strFind("-")>-1 then fields = DATA.split("-") else fields= DATA.split(" ")
emit id, fields.getItem(0) as NAME, fields.getItem(1) as VALUE
After this you can use Pivot node Data to Names, where you will set top three params as NAME, VALUE, id and you should be able to see the output as you wanted...
Of course there are few dependencies on data, but this should be sufficient for you to provide you with guidline on how to approach parsing of such data.
Marek