Maximum length for columns of SQL type varchar
Hi,
I've been running a couple of processes in Rapidminer in which I run my query to write database in MySQL.
I've been uploading quite a few datasets with no issues but experienced an error message I've never seen before.
"attribute page ref contains values with length> 255 which is the maximum length for columns of SQL type Varchar"
I'm using the write database operator and other files and processes are fine to upload. When I look at mySql table the attributes Page_ref is of datatype varchar(900). I've tried to both tick and untick the set dafault varchar lenght in the write database operator but it does not seem to make a difference.
Any ideas what is causing this error?
Best Answer
-
Edin_Klapic Employee-RapidMiner, RMResearcher, Member Posts: 299 RM Data Scientist
Hi,
try using the Operator "Nominal to Text" and convert the relevant attributes to the value type Text. Then you do not run into issues if there will be entries longer than 900 characters in the future.
Best,
Edin
1
Answers
@BalazsBarany any idea?
Hi,
I tested it on a MySQL database (5.5.55) with RM Studio 7.4. Created a table with a VARCHAR(1200) column.
Write Database was able to write long nominal values into the table without problems (even longer than 1200 characters - known misfeature of MySQL). I tested both MyISAM and InnoDB tables.
What is your database version? Since MySQL 5.0.3 it is possible to have VARCHARs with more than 255 characters. However, there's an overall row size limit (65,535).
Regards,
Balázs
Hi,
My MySQL database is version 6.3.3.
What's confusing is that I'm able to write very similiar processes without any issues.
Great, thanks this worked!