01-08-2023 10:45 PM
Hi,
Why File Reader and File Writer size variation in the Pipeline?
I have make a simple pipeline to check my reader output file size and writer output file size and I have observed that reader and writer output size us not matching.
Could anyone please explain to me that.
01-10-2023 01:01 AM
Hi @sshaikh,
Good day, try to see if your original file json formt are properly indented or perhaps in pretty-print mode this might be the reason for the difference in file size
For better understanding, try to open both files then compare the content… by comparing the files you will get your answer why there’s a difference in file size
Thanks,
EmEm
01-10-2023 08:22 PM
Hi @alchemiz
Good day,I have observed the input and output format of file. There was, for input proper structured json file file was there but for output json structure in a single line. I think the space utilization in proper format is reduced in output so its size reduced.
Thanks @alchemiz.
Is there any way in Snaplogic by which we can get the same structured for output just like input structure?
01-09-2023 10:02 AM
Why do you expect the size to be the same? You’re changing the format from XML to JSON. JSON is less verbose than XML, so if it contains the same data, I would expect it to be smaller.
01-09-2023 10:06 PM
@ptaylor
File Reader(Json File)>>Json Parser>>Json Formatter>>File Writter
If I read and write the file using above pipeline I am getting the reduced File Size at end.
Why there is Difference in file Size ?
Is there difference due to conversion from DOC to Binary and vice versa ?
01-10-2023 12:32 PM
Ok, so the use case you’re asking about now changed to remove all XML and is only JSON?
I agree with @alchemiz. I’m guessing the bigger one is pretty-printed and the smaller one isn’t. Try checking the pretty print option on the Formatter and see how it compares. Even then, there are many ways to pretty print JSON so it probably won’t match exactly, but it will be closer.