Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I would like to check in the tFilterRow advanced mode if the ID (integer) field of my csv file contains a value different from an integer or not. The objective is to reject lines in which this ID field is empty or contains a string or a character ... But I do not know how to do it. Here is an example of my file:
id ,name,etat
18209,COLLECTIVITE LOCALE,ACT
18210,836,DEGROUPAGE,2,ACT
,836,DEG,2,ACT
wsadza,GLOBECAST,ACT
836,TRANSPAC,ACT
Here is what I tried but that does not reject the empty values and others
input_row.ID%input_row.ID != 0
Thank you for your attention
Remove "Die on Error" option in tFileInputDelimited .
You will have option to link rejects to a file.
input_row.ID != null && input_row.ID.matches("\\d+")
Hello,
Thank's for your answer but I have this error :
"The method matches(String) is undefined for the type Integer"
Indeed the field ID is of type integer and I do not want anything other than an integer.
Great Abhishek,
Since I want to redirect the rejected lines to a file, how can I do it? I was thinking of tFilterRow but that's not the case.
thank you in advance
Remove "Die on Error" option in tFileInputDelimited .
You will have option to link rejects to a file.