I have been trying to read data from a table in SQL with a number of fields (some fields contains blank values). I receive the following error:
Execute failed: Runtime class of object "" (index 0) in row "Row1" is StringCell and does not comply with its supposed superclass BinaryObjectDataCell
The error is caused by the fields with no data. Since, the table is having 25-30 fields and I require almost all the fields other than the blanks cell, writing a custom uery in the database reader is not a feasible solution. (I have 50 other tables of same kind). Is there any other way to mitigate this error other than writing a custom query to ignore the blank fields?
Which database system are you using? What do exactly do you mean with "blank values"? Empty strings, NULL, ...? What's the column's type in the database?
found an alternate solution. used different node to construct the same dataflow.
I have used "database connector" and "database column filter", read the data using "database connection reader" node , instead of database reader and writing a custom query.
I just tested with SQL Server 2012: created a table with an "ntext" column and inserted two rows, one with a text, another with an empty string. The reader node in KNIME correctly creates a String column and reads both values from the database. There most be something else wrong in your case. I was using the latest sqljdbc4.jar from Microsoft. Maybe you are using a different driver?
Can you try other Java-based client? For example eclipse, IntelliJ idea, Netbeans have DB query extensions. If the select * ... works also similarly to KNIME's behavior -with the same JDBC driver- that might be an indicator of a bug in the JDBC driver.
My other guess would be incompatibility with encodings or byte order marks, though that whould not explain why things work when there is only a single column.