Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Please can you explain briefly.
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
Sure . Let me try and get back to u. Thank You.
Please let me know if u have created any sample job for this. So i can create the job based on that.
Actually my file headers are
emp_id,name,lastname,age,designation
evrytime the column positions will be changing. we dont know how the columns will be in csv file. So how can we achive in this position. We need to validated column header dynamically.
I am not able to make the column as dynamic type. can u share the java code to check all the columns are present.