Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
this is aditya,i need to validate .csv file with rows.i have 3 columns but in some records i am having empty columns and in one record i am having extra column so here i need to validate rows in .csv.i need output like records matches with header remaining records should be eliminated.please find the image below.
Hi @adutta ,
I believe your query is that you would like to validate the schema of your input data. Could you please try the component tSchemaComplianceCheck which will segregate the records to good and bad based on the schema defined?
I believe it will solve your query.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi aditya,
Try to use tschemacompliancecheck , it will solve your issue.
Thanks,
Prabuj
/Don't forget to give kudos/
Hi thanks for given reply,please check my image even i am using tschemacompliance check i am getting error with one record i.e record having extra column.please check my snapshots once.thank you.please help me.
@adutta alright, here is what i found out.
First, you are expecting 1,2,4 as invalid - 3,5 column as valid. if m right.
Second, i think it's not possible to bring 1 as a invalid, it don't have empty value or null.
Using the length it can be trim or avoided, even then it won't result as what you looking for !
Please let me know if you bring it up and share us well !
Thanks,
Prabuj.
i am getting error like this image bro,plz check.i have increase jvm parameters as well
Are you trying to use the substring function for an integer value? That doesn't work.
hi bro,sorry can you please tell me how to use substring for int
Something like this: (row1.newColumn.toString()).substring(2,4)
So if row1.newColumn = 123456789 this will give you 34 as output.
Input is int.....output is a string value in this case, but you can cast it to an int again.