cancel
Showing results for 
Search instead for 
Did you mean: 

Writing flat file

ayush_vipul
New Contributor III

Hi Team

For my current use case, I need to write a flat-file.

image

I am using the following pipeline to write csv.

image

Input to JSON formatter is a document of arrays each having different no of properties.
image

Can you please suggest a way to generate CSV file ignoring all null values and writing only what is present?
Note - Each input document to CSV formatter has different set of properties.
Thanks in advance

5 REPLIES 5

del
Contributor III

@ayush.vipul, see if the attached pipeline will assist you as an example. I have simple, arbitrary data in the JSON Generator, but the Mapper and Fixed Width Formatter is the key. The Field Width value in the Formatter is also arbitrary, but needs to be set large enough to handle the longest expected line widths.

Community.5728_2019_07_19.slp (5.8 KB)

ayush_vipul
New Contributor III

@del Thanks.

This helps us achieve what we we looking for.

Best Regards
Ayush

sshaik
New Contributor III

After trying this scenario. I want read that file and send the data to AWS.But, I’m getting same thing again in the Fixed width Parser
image

sshaik
New Contributor III

image