One Star

[resolved] Validating headers from file

We have a job set up to import data from csv file in database. But since the client data file is not always consistent, I want to have column sequence validation.
For example, 
Actual file :
Address,Name, Email, Phone1, Phone2
Inconsistent file :
I am looking to import the file only if the sequence is correct else reject that file.
Is there a component in Talend which allows to validate column names ? 
I know people have suggested to read first line (headers) and compare it using tjava. Is there any other way to validate the sequence of columns from file without hard-coding it in tjava ?
Community Manager

Re: [resolved] Validating headers from file

No component can do this, you still need to read the first line and write a simple Java code to validate it, I think writing a Java code to validate is more simpler than writing a component to do it.
Talend | Data Agility for Modern Business
Five Stars

Re: [resolved] Validating headers from file

I think you are looking for something Validate CSV Headers

check this link for how to achieve it. 
One Star

Re: [resolved] Validating headers from file

Thanks Shong and Umesh.