The Transformer stage provides a set of predefined operations that can be performed on the input data. Generally, these predefined transforms run faster than custom transforms, since they are already compiled. However, when defining a large number of transforms, a custom transform will run faster. For example, to trim a number of fields, the custom transform below will typically run faster than nine separate trim transforms.
data['AddressLine1'] = (data['AddressLine1'] != null) ? data['AddressLine1'].trim() : null;
data['AddressLine2'] = (data['AddressLine2'] != null) ? data['AddressLine2'].trim() : null;
data['AddressLine3'] = (data['AddressLine3'] != null) ? data['AddressLine3'].trim() : null;
data['AddressLine4'] = (data['AddressLine4'] != null) ? data['AddressLine4'].trim() : null;
data['City'] = (data['City'] != null) ? data['City'].trim() : null;
data['StateProvince'] = (data['StateProvince'] != null) ? data['StateProvince'].trim() : null;
data['PostalCode'] = (data['PostalCode'] != null) ? data['PostalCode'].trim() : null;
data['LastName'] = (data['LastName'] != null) ? data['LastName'].trim() : null;
data['FirstName'] = (data['FirstName'] != null) ? data['FirstName'].trim() : null;