Is there a way to retrieve certain metadata of a file such as file size?

0 votes
asked Aug 21 by nathan-b-7857 (330 points)
Looking to see if there's a function like the below:

In which I can retrieve the size of an associated file.

The source connector is an FTP retriever.

1 Answer

0 votes
You can use the length property of message.getBytes() to get the size of the current message in bytes.  For example, the below would store the file size in a variable called fileSize:

var fileSize = message.getBytes().length;
answered Aug 22 by jon-t-7005 (6,410 points)