A Write to Data Store Entity smart service fails and errors out in the application server with the following error when attempting to write to an RDBMS table that has a trigger configured to write data to a secondary table:
java.sql.BatchUpdateException: Unknown column 'X' in 'example': com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'X' in 'field list' Data
When checking the table, the column in the error exists.
A trigger is a SQL procedure that initiates an action when an event (INSERT, DELETE or UPDATE) occurs. Since triggers are event-driven specialized procedures, they are stored in and managed by the RDBMS. Check the configuration of the trigger to verify that the trigger writes data to a secondary table. This particular error is thrown because the secondary table doesn't include the column mentioned in the error message.
In the relevant database administration tool (such as phpMyAdmin, MySQL Workbench, etc.), navigate to the table where the unknown column exists. Find the location where the trigger is established and verify that the secondary table you are updating contains column X.
This article applies to all versions of Appian.
Last Reviewed: August 2018
© 2020 Appian. All rights reserved.