• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Data Quality: NumberFormatException: For input string: ""

#1 2012-06-21 06:21:52

asadri
New member
Registered: 2012-06-21
Posts: 2

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?

Offline

#2 2012-06-21 07:36:41

karthikj18
Member
Registered: 2011-08-11
Posts: 57

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.


Thanks,
Karthikeyan.

Offline

#3 2012-06-21 08:44:55

avdbrink
Member
Company: Conspect Consulting & ICT
Registered: 2010-11-08
Posts: 360
Website

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

Offline

#4 2012-06-21 18:22:19

asadri
New member
Registered: 2012-06-21
Posts: 2

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.

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Data Quality: NumberFormatException: For input string: ""

Board footer

Powered by FluxBB