One Star

Data Quality: NumberFormatException: For input string: ""

Hi,

I am new to the tool and I am trying to find out its functionality. A sample csv file is created as following:
Col1,col2
1,2
The columns have been imported as an Integer type.
When I run a Simple Analysis, I get the following error message:
2012-06-21 00:18:34,116 ERROR org.talend.dq.analysis.AnalysisExecutor - java.lang.NumberFormatException: For input string: ""
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at org.talend.dq.indicators.DelimitedFileIndicatorEvaluator.executeSqlQuery(Unknown Source)
at org.talend.dq.indicators.Evaluator.evaluateIndicators(Unknown Source)
at org.talend.dq.indicators.Evaluator.evaluateIndicators(Unknown Source)
at org.talend.dq.analysis.DelimitedFileAnalysisExecutor.runAnalysis(Unknown Source)
at org.talend.dq.analysis.AnalysisExecutor.execute(Unknown Source)
at org.talend.dq.analysis.AnalysisExecutorSelector.executeAnalysis(Unknown Source)
at org.talend.dataprofiler.core.ui.action.actions.AnalysisExecutorThread.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
eclipse.buildId=unknown
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_CA
Command-line arguments: -os win32 -ws win32 -arch x86
How can I fix this error?
4 REPLIES
One Star

Re: Data Quality: NumberFormatException: For input string: ""

Hi
You can check that you have considered the first row as column name row in the source component. This error occurs when Talend identifies inserting string in the integer field.
One Star

Re: Data Quality: NumberFormatException: For input string: ""

Hi,
You might as well have the "Skip empty rows" option unchecked. This way the third row will be read as "","" resulting in an row with empty values which, in turn, will not pass integer validation.
Regards,
Arno
One Star

Re: Data Quality: NumberFormatException: For input string: ""

Thank you for your replies. Removing the caridge return at the end of the csv file solved the issue.
Six Stars

Re: Data Quality: NumberFormatException: For input string: ""


@avdbrink wrote:
Hi,
You might as well have the "Skip empty rows" option unchecked. This way the third row will be read as "","" resulting in an row with empty values which, in turn, will not pass integer validation.
Regards,
Arno

where ..?