I have a pipe delimited file having columns in different format. What would be the best way to validate it.
I am splitting the columns and taking it to variables. Now how should I validate each fields ?
The max value of the column is specified in the bracket. Eg, column 3 is defined as varchar(5) , it should not go more than 5byte.
if a field is failing for validation I need to write the failure notification to another file.
Expected output would be something like below
int|decimal field not in range|varchar(5)|date|varchar(8)|decimal(14,3