Primary key error in Export tool

We currently have two apps set up with the export tool that are working fine, these were set up by a volunteer a few months ago. I am now taking over this work and am currently trying to set up a new app for automatic updates. When running the query I get the following error

./usr/local/lib/python2.7/site-packages/sqlalchemy/sql/ SAWarning: Column ‘’ is marked as a member of the primary key for table ‘surkhet_a_registration’, but has no Python-side or server-side default generator indicated, nor does it indicate ‘autoincrement=True’ or ‘nullable=True’, and no explicit value is passed. Primary key columns typically may not store NULL.

This is what that section of the template looks like. This is set up through an automated Alteryx process, and should thus be the same as the previous two apps.

The app in question has 30 cases registered and from looking at the manual form export the formids are present. I don’t know if this is of relevance, but when setting up the form export, it tells us that there are 55 form submissions rather than 30. The log also tells us that “Received 0-1000 of 55”.

Any idea what this error could be indicating?

Hi Naledi

When exporting to SQL you always need a field called id. Looking at your config I can see that you have mapped the form ID to the field ‘formid’. You should rename the ‘formid’ field to ‘id’.

I’ll update the tool to give a better error in this case.

Thank you for the quick reply Simon. That fixed it!