Hi folks,
I’m trying to setup a writer to a MySQL database table with a calculated column. When importing the table from the data source, FME (correctly) ignores the calculated field, so when I look at the table’s attributes (screenshot below), the column is not listed. However, when I try to use the writer, the calculated field gets included in the generated SQL insert and so the write itself fails with an error that a calculated field can’t be written to:
Error executing SQL query ('INSERT INTO `StageDate` (`Date`,`Year`,`MonthNumber`,`MonthName`,`Day`,`Weekday`,`WeekdayName`,`IsWeekend`,`AcademicYearCode`,`AcademicYearDescription`,`FiscalYearDescription`,`Checksum`) VALUES ('19000103','1900','1','January','3','3','Wednesday','0','1899','1899-1900','1899-1900',NULL),...: 'The value specified for generated column 'Checksum' in table 'StageDate' is not allowed.'
Note the `Checksum` in the column list and the NULL at the end of the feature values.
We use this same technique with an Oracle database and it works well - the Oracle writer completely ignores the calculated column. Is there any way to adjust the MySQL writer parameters to do the same thing? (I see a similar issue with the PostgreSQL writer, but generating my own SQL statements seems a less than ideal solution to this.)
Thanks!