Two Stars

Validate the CSV file schema dynamically?

Please let me know how to validate the csv file schema dynamically. Please let me know any one have implemented this in Talend open studio.

4 REPLIES
Seven Stars

Re: Validate the CSV file schema dynamically?

open csv file adding one column more.
this one have to be empty.
Two Stars

Re: Validate the CSV file schema dynamically?

Please can you explain briefly. 

Seven Stars

Re: Validate the CSV file schema dynamically?

in a csv file

col1;col2;col3

a;b;c

if you open and get the first line (column name)

you an count column (=3)

 

on a second time if you read a line like this one: e;f;g;h

there is something wrong.

 

a csv file (first level) is never invalid col1=e col2=f col3=g;h

you can add coma enclosure (CSV Options)

 

the same line can be wrong

"e";"f";"g";"h" --> ???

"e";"f";"g;h" --> ok

 

think about what is an invalid csv file?

 

that's all

 

Two Stars

Re: Validate the CSV file schema dynamically?

Sure . Let me try and get back to u. Thank You.