In DataWeave withMaxSize function is used the get the string value on the basis of the length defined withMaxSize, if the defined length is less that the string value then it cuts the length from left to right as substring method in Java.