CSV with header, detail, and trailer records on S3

I need to create a pipe delimited text file. The file needs to have a single header type record row with two columns, infinite number of detail record rows, and a single trailer type record row with three columns.

00|File Type Description

I thought I could use multiple CSV parsers + File writer snaps and then just APPEND the detail records and the trailer record, but it looks like the APPEND function isn’t supported on S3. Any ideas on how to accomplish this?

Does anyone at SnapLogic have any idea how to do this? This is a fairly common scenario in the healthcare world and I can’t figure it out and need to have this pipeline working soon.

Solution_2020_03_05.slp (10.5 KB)

Here is one way to achieve this as per the sample data.

Here is another solution that uses Gate and JSON Generator to handle multiple records from any of the three incoming streams. Note that it does expect each of the incoming documents to have a single field “record” containing the full record data.

Header_Body_Footer_to_File.slp (12.3 KB)