11-15-2017 02:57 AM
I need to generate multiple files based on category, say for example, The table having list of columns and category column have multiple values.
Category:
So from above category, I need to generate 4 files with its records in separate files dynamically in Snap Logic.
Can any one have any idea/suggestion how to achieve this?
11-20-2017 12:06 AM
Thank you for the input and solution for json file. Is there any approach for CSV file format?
because there is no specific way to write our contents($group) to in CSV parser/formatter. But we have it in JSON for-matter “Content” option.
11-20-2017 02:04 PM
As you point out, the CSV Formatter does not have the Binary Header or Content properties like the JSON Formatter. As an alternative, you can pass the category groups into a child pipeline and do the processing there. Using a child pipeline allows you to specify the file name through a pipeline parameter that is referenced in the File Writer. The child pipeline should consist of the following snaps:
The splitter will break apart the category groups into individual documents again, which is what the CSV Formatter is expecting. The File Writer is then configured to write to a file using a file name from a pipeline parameter.
In the parent pipeline, replace the JSON Formatter/File Writer with a Pipeline Execute snap that calls the child pipeline and passes the file name in a pipeline parameter.