Friday, October 7, 2016

Access input file filename in MEC Map


One of my customer had a requirement to add condition inside MEC mapper depending on the name of the file received. I have checked existing classes provided by MEC and observe that MEC has  a function as getManifestInfo() to retrieve metadata information.



Code example:

String fileName  =  getManifestInfo(ManifestConstants.COM_FILENAME);

cat.info("File Name" + fileName);