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
write database error
RM does a great job! Congratulations to the development team!
I am now learning it and having fun; I should say I already have some experience with other commercial DM suites.
Here is some problem I've encountered: I've read a dataset from a Postgresql database table, loaded a classification model I've learned previously and scored the dataset, successfully displayed the scored dataset, and then tried to save it in a new database table (using the operator Write Database). It did not work because the values of one of the attributes had more than 9 characters! It seems that RM always creates table columns for the nominal attributes with the SQL type name (why such a limitation?), whose length is 9 characters. Even if I created a table myself where the result was to be stored with proper data types, it did not work either - same error. However, the Read Database operator managed to read the same column correctly in the beginning.
Any comments on this? Have you experienced similar problems with other database management systems? Any solution? Finally I removed the column before saving the result and it worked ... but ... it is not what I intended.
Thanks for your comments. Regards
Dan
0
Answers
Trying the "set_default_varchar_length" parameter works for me.
I had the same problem as Dan. But your suggestion of using "set_default_varchar_length" didn't work for me. What value did you set? Are you sure you were using postgres?
I think this must be a RM bug when trying to write nominal attributes as sql type "name". From the postgres docs http://www.postgresql.org/docs/9.0/static/datatype-character.html this fixed length type is clearly not intended for this kind of use. Quote : "The name type exists only for the storage of identifiers in the internal system catalogs and is not intended for use by the general user. "
Anyone know of a work-around?
Thank you!
"name" is really a strange SQL type. RM is creating the type the SQL driver says is most appropriate for strings. Could you try to update your Postgres JDBC driver?
You can get it here:
http://jdbc.postgresql.org/download.html
Just copy it over the one contained in RapidMiner/lib/jdbc. Please let me know if that changes anything.
As a workaround, you can simply pre-create the table with appropriate data types, which is more appropriate in any reasonable application anyway.
Best,
Simon