The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
DatabaseExampleSource - Fail to convert to internal representation
nicugeorgian
Member Posts: 31 Maven
Hello,
when using the DatabaseExampleSource with an Oracle database system, I get the following warning several times:
'Cannot read database data: Fail to convert to internal representation [class java.sql.SQLException]
Do you happen to know what this exactly means?
Many thanks!
Geo
when using the DatabaseExampleSource with an Oracle database system, I get the following warning several times:
'Cannot read database data: Fail to convert to internal representation [class java.sql.SQLException]
Do you happen to know what this exactly means?
Many thanks!
Geo
Tagged:
0
Answers
If a column's value is string, then the above warning is issued when attempting to convert the value to the types Int and Double.
It's still not clear to me why these attempts to convert to the types String, Int, and Double ... Any ideas?
Geo
could it be that you have defined the value types for the attributes as numerical but the data columns actually contain strings?
Cheers,
Ingo
thanks for the answer. I don't exacly understand what you say.
I got this warnings at the console, when I run the Java program that contains a DatabaseExampleSource operator.
I think it has to do with the "datamanagement" parameter of the DatabaseExampleSource operator. This parameter determines how the data is represented internally. I think the default value of this parameter is "double_array".
I have both numerical attributes and nominal (categorical) attributes. It's not clear to me how to specify with the DatabaseExampleSource operator (and with the Weka learner I subsequently use) the attributes' types.
Any idea?
Many thanks!
Cheers,
Geo
ok, I digged a bit deeper. To start with, it has nothing to do with the "datamanagement" parameter. This just defines how data is internally represented by RapidMiner when loaded into memory. But this does not cause the problem here since the error is an Oracle specific error with error code 17059. I searched for the phrase "Fail to convert to internal representation [class java.sql.SQLException]" in Google and found for example this link:
http://www.dbmotive.com/oracle_error_codes.php?errcode=17059
It seems that your Oracle database contains at least one column with a Oracle data type not known to your JDBC driver / the types defined by Java. We currently support the types The return value shows to which RapidMiner attribute the column type of your database will be transformed.
Can you show the select statement and the schema of your tables? Maybe we could find out then which type is causing the problem here and maybe this can be solved by simply adding it to the type definitions shown above.
Thanks,
Ingo
thanks for the answer.
The query is simply: SELECT * FROM RM_INPUTDATA
Here's the (somehow simplified) design of the table RM_INPUTDATA:
Attribute1: Number (Double)
Attribute2: Text (size 3)
Attribute3: Text (size 2)
Attribute4: Text (size 12)
Attribute5: Text (size 5)
Attribute7: Text (size 8)
This is the typical message I get (at console) for every table record:
attribute1 --> String: '3243', Int: '3243', Double: '3243.0', Missing: 'false'
. . .
attribute4 --> String: 'GREC 'Cannot read database data: Fail to convert to internal representation [class java.sql.SQLException]Cannot read database data: Fail to convert to internal representation [class java.sql.SQLException], Missing: 'false'
. . .
Here, attribute4 is defined of type Text (of size 12), but its value has the length 4. Could this be a problem? :-\
Cheers,
Geo
I missed the point that you used RM 4.1beta (taken from the other topic). There was a debug message in this beta version which is removed in the final version 4.1 which tried to convert each field to a string, to a double, to an integer independently of the actual column type. So the line was produced by something like The error message just tells that it is not possible to get a number from a text. So nothing wrong here: it was just a debug output in the beta version which is gone now. Just update to the latest version and you will no longer get these messages.
Cheers,
Ingo
Many thanks Ingo!