Flat File Processing Structure

Hi all,

I have a flat file where records share the same key. Does anyone know if it is possible to group records together based off of the common key via using flat file schema and definition? If you can, is this what composite definitions are for?

for instance, lets say I have a flat file where a field is delimited by a pipe and a record is delimited by a newline. The key is the last field of the record.

example flat file:

a | b | c | key1
d | e | f | key1
g | h | i | key2
j | k | L | key2

is it possible to output using convertToValues with structure similar to this?:

-docList
----records (key1)
--------record[0]
------------field1 (a)
------------field2 (b)
------------field3 (c)
------------field4 (key1)
--------record[1]
------------field1 (d)
------------field2 (e)
------------field3 (f)
------------field4 (key1)
----records (key2)
--------record[0]
------------field1 (g)
------------field2 (h)
------------field3 (i)
------------field4 (key2)
--------record[1]
------------field1 (j)
------------field2 (k)
------------field3 (L)
------------field4 (key1)

p.s. I have tried multiple ideas, but have failed every time. Any help would be appreciated!

Bekker – It is not straight forward, you should write a logic in your flow service to acheive it.

Thanks,

1 Like

Thank you for the response, I will do it via flow service

Okay, please let me know if you come across any issues on which I can assist.

Thanks,