05-27-2021 12:38 PM
Hello Everyone!
We are planning to build a pipeline to achieve the following scenario.
Extract Oracle Data → Create a CSV File → Zip CSV file → Convert Zip file to Base64 Format.
We build the pipeline as following. We were able to do all activities till zipping the file but, we didnt find any Snaps available to convert Zip file to Base64 format.
We saw mapper has functionality to convert the contents into Base64 format but, we didnt find any Snap that can convert entire zip file into Base64 format.
Please help with your suggestions if anyone come across or have some idea to achieve this?
Thanks,
Pradeep.
05-27-2021 01:42 PM
you can use the expression Base64.encode(GZip.decompress($content))
in a mapper to decompress your zipped file and encode it into Base64 format.
Where $content is your zipped file
05-27-2021 03:04 PM
05-27-2021 10:45 PM
@pradeep.moganti If you want encoded format content before writing to zip, use mapper after csv parser, change the input view and output view of mapper as binary (pfa screenshot)then use the expression - Base64.encode(GZip.decompress($content)) and then connect in zip write.
.
If you want to format after file write, then first read the zip file and then use the mapper as I mention below
06-02-2021 02:53 PM
Bumping up!