Are you just trying to check for nulls manually (i.e. branch on your field, if null throw exception?). Obviously, you can also do this in java if you have many fields to check.
After the branch, create a sequence labeled “$null” (in the sequence properties - label). The sequence should be moved beneath the branch (blue arrow right).
Please clarify the problem if this does not seem to work as desired.
I have many fields to check for null. I was hoping if convertToValues can validate if the field is null/empty.
Since this is fixed length flat file, though the field is null/empty, after convertToValues the field as space. Because of these space, convertToValues is not validating.
Ex: if I have a field ‘A’ with length 8 characters. I have set the field as mandatory in flat file schema.
convertToValues must valid and error if the field is null/empty. But this field is taken as if it is 8 spaces and so validation fails.
I have followed the thread mentioned, by placing a format service, all empty fields are nullified, but validation is failing.
yes I can use java service or a branch step to check, but I was hoping if convertToValues can validate.