Hi Rebecca,
Try with below UDF code and use UDF for target root node.
int len = s.length(); byte[] data = new byte[len / 2]; for (int i = 0; i < len; i += 2) { data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) + Character.digit(s.charAt(i+1), 16)); } try { OutputAttachments outputAttachments = globalContainer.getOutputAttachments(); Attachment newopAttachment = outputAttachments.create("ImageFileName.jpg", data); outputAttachments.setAttachment(newopAttachment); } catch (Exception e) { e.printStackTrace(); //throw new StreamTransformationException(e.toString()); } return "";
//BR,
Praveen Gujjeti