Skip to main content

#DataWeave 10 discussing

how to convert .csv file to .zip file in Mule4. Is there any custom connectors ? Can someone let me know if there are better solution.

 

Note: java code is not preferred.

 

#DataWeave 2​ #Mule 4​ #DataWeave 1​ 

8 answers
  1. Feb 11, 2020, 7:08 PM

    if multiple files, I will make use of Archive operation instead of Compress. For entries, you can follow below

     

    {(payload.data map(value, index) -> {

    (value.fileName) : value.payload write "application/csv"

    }

    )}

     

    where you want to write set of entries. Above command will result to

    {

    "test1.csv" : [<content>],

    "test2.csv" : [<content>]

    }

0/9000