One Star

Validation rules and error messages

Hello,
I'm working on Talend Enterprise Data Quality V5.2.2.
I try to design a job to check the data syntax of a CSV file. To do this, in my metadata, I defined a generic schema and a validation rule that points to the fields of this schema. The validation rule is described by an expression and is used to check the complete syntax for all fields of a record of my CSV file. Then I use this validation rule in a tSchemaComplianceCheck.
How can we define the error message (or error code) that I want to log when a record is not consistent with this validation rule? In short, I try to be able to specify which fields on my record is not consistent and why by positionning my error message in my validation rule, if possible.
In advance, thank you for your help.
1 REPLY
Community Manager

Re: Validation rules and error messages

Hi
When defining a validation rule in Repository, you can check the 'Make rejected data available on Reject link in the job design' option in the last step to log the records which do not matches the validation rule into a data flow called validation reject. Please see my screenshot, the unmatched records are reject and the errorMessage column displays the error message why it is rejected.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business