Error Reading Back Keys, Because Table 'X' No Longer Has a Primary Key DefinedError Example:An error occurred while executing connection '<connectionName>': Error reading back keys, because table '<entityName>' no longer has a primary key defined. The most common case for this is that an error which occurred earlier left the data in an inconsistent state. Metabase will not be updated. Cause:There are a couple of known causes for this error. The first is due to a unique constraint violation with a custom primary key (one defined in the Connector UI that is not the set Primary Key in the data source). Originally this had alerted as "No primary key information available..." but was corrected to the error above. If this is the cause, there will be a second error in the event log: Error while writing data to entity '<entityName>': These columns don't currently have unique values. Write operation is aborted. The second known case is due to metabase write interruption or corruption, which may cause duplicate key values to be added. In this case, the configuration may have two proper primary keys defined but it will still abort the sync. This also originally alerted as "No primary key information available...". Resolution/Workaround:For the first case, you should check your defined primary key columns and remove any duplicates to fix the source of the error. For the second case, you will need to delete and rebuild the metabase. See the Resolution section of The Metabase Could Not Be Read for how to do this. |