[resolved] Validating headers from file

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 :
Name,Email,Address,Phone1,Phone2
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

Hi 
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.
Shong
----------------------------------------------------------
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. 

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download