Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tFileInputDelimited_1 - Error

Hi,
I am trying to load .txt file to another .txt file. It's just a plain load. But I am getting following error.

connecting to socket on port 3406
connected
Exception in component tFileInputDelimited_1
java.lang.NumberFormatException: For input string: " 1"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at routines.system.ParserUtils.parseTo_Integer(ParserUtils.java:73)
at test_java.curr_demo.curr_demo.tFileInputDelimited_1Process(curr_demo.java:429)
at test_java.curr_demo.curr_demo.runJob(curr_demo.java:1075)
at test_java.curr_demo.curr_demo.main(curr_demo.java:1014)
disconnected

Sample Data:
001116533| 1| 7| 1| 1| 6| 8| 7| 5|11| 9| 4|10| 6| 4| 1| 3| 4| 0|28| 0| 0.0000|4|10661.24|999|10661.24
001141168| 2| 6| 1| 1| 4| 8| 4| 3| 9| 3| 1|13| 4| 2| 1| 1| 6| 0|38| 0| 0.0000|4|3185.662|999|3185.662
001309633| 2|12| 1| 2| 5| 8| 5| 3| 2| 4| 3| 2| 8| 2| 1| 3| 6| 0| 2|47|2159.200|3|2764.614|999|2764.614
001315564| 6| 8| 1| 1| 4| 3| 4| 3| 7| 6| 3| 1| 8| 2| 0| 2| 2| 1|52| 0| 0.0000|7|7344.500|999|7344.500
003107169| 4| 8| 1| 2| 3| 4| 3| 2| 2| 7| 2| 2| 7| 2| 1| 2| 1| 1|37| 0| 0.0000|2|3856.955|999|3856.955
003119495| 4|11| 1| 2| 3| 2| 3| 3| 2| 5| 1|13| 8| 2| 0| 3| 1| 1|19| 0| 0.0000|2|8127.013|999|8127.013

Can any body help me to resove the issue?
Labels (3)
4 Replies
Anonymous
Not applicable
Author

Hi
What's your datatype of columns in schema of input file?
Best regards
shong
Anonymous
Not applicable
Author

Hi,
All the columns are "integer" and columns which are having precessions are "float.
Thanks
Anonymous
Not applicable
Author

Hi
Theres are some blank space in your file: | 1| 7|, so if your datatype is "integer", it will throw exception. You can set the datatype as string in your schema and your job will run fine.
Best regards
shong
Anonymous
Not applicable
Author

Thanks Shong, it is working.
But in my output table (Database) I want these columns as integers only. In tMap, left side if I take it as "string" for columns and right side if I take it as "integer" for columns then it is showing warning.
Actually, once the data is red we trim all the records before loading data to the table. This is part of our transformations.
Is there a way to read these records without any space while reading input data.
Thanks again...