Dear Sir/Madam,
I am contacting you in regards to the HXTT Text (CSV) JDBC 3.0 Package.
My question is if there is a method to validate the CSV file and report the problems, prior to executing the select statements on a CSV file.
If there is no such possibility, can you recommend a way to check if a CSV is valid (maybe the parser / query does not raise an error even if there is one). Or even by using a third party tool.
Thank you for your time and assistance.
Best regards,
Johnathan
|
>My question is if there is a method to validate the CSV file and report the problems, prior to executing the select statements on a CSV file.
CSV file will be validated when it load."Select count(*) from acsvfile" will check that file.
ignoreDirtyData connection property: Indicates whether ignores all dirty data and return null value when failed to parse number value or date value. You can use the following code to know where's dirty data in your file.
warnings=rs.getWarnings();
if(warnings!=null){
do{//SQState: C0106 Convert dirty data into null value
System.out.println(warnings.getMessage());
System.out.println("Error Code:"+warnings.getErrorCode());
System.out.println("SQL State:"+warnings.getSQLState());
}while((warnings=warnings.getNextWarning())!=null);
rs.clearWarnings();
}
Default value: false
|