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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tFileInputDelimited type mismatch error

When I use tFileInputDelimited I am getting a data type error for input fields that are not strings. In my case a long and a date.
I get the following errors:
Exception in thread "Thread-1" java.lang.Error: Unresolved compilation problems:
Type mismatch: cannot convert from String to Date
Type mismatch: cannot convert from String to long
Here is a sample line from CSV: 6545646S2A7;TEST2222CYYL0000;28-04-2010;1664486487;Very_very_long_string
I looked at the offending lines in the code and I noticed the following:
if (temp_tFileInputDelimited_1.length() > 0) {
row10.CRC = ParserUtils.parseTo_long(temp_tFileInputDelimited_1);
} else {
row10.CRC = "";
}
if (temp_tFileInputDelimited_1.length() > 0) {
row10.date = ParserUtils.parseTo_Date(temp_tFileInputDelimited_1, "dd-MM-yyyy");
} else {
row10.date = "";
}
If the length is 0 for each of these, shouldn't the values be set to NULL for a date and 0 or NULL for a long rather than "" - (an empty string)?
I realize that I can just set these to strings and then use a tJavaRow or tConvert to convert the strings back into the long and the date, but that seems cumbersome.
Any thoughts?
I am using TOS 4.0.1/Java on Windows
Labels (3)
1 Reply
Anonymous
Not applicable
Author

Submitted as bug 0012951