How to encode (base64 format) a zip file?

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.

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

@cjhoward18

I am unable to setup the mapper. Do you know how the mapping should be?

@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

Bumping up!