Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Check out our powerful new search update! You can read more here. Please let us know if you have any feedback by creating a topic here.

Output error - Duplicate records


I am getting a consistent error when I am trying to output data. I have tried so many things to resolve but I consistently get the same error. 


Here is the error: Output Data (2)  DataWrap2ODBC::SendBatch: [MySQL][ODBC 5.3(a) Driver][mysqld-5.7.12-enterprise-commercial-advanced-log]Duplicate entry '94771789' for key 'PRIMARY' Insert into `SPER_Requests`(`REQUEST_ID`,`INITIAL_REQUEST_DATE`,`LAST_REQUESTED_DATE`,`REQUEST_TYPE`,`SECURITY_ID`,`SECURITY_ID_TYPE`,`GLOBAL_CUST_ID`,`ADDED_DATE`,`STATUS`,`STATUS_DESC`,`OWNER`,`OWNER_DESC`,`PORTFOLIO_ID`,`NAME`,`LAST_UPDATED_DATE`) Values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)


Has anyone experienced this? it seems like the database is telling me that what I am trying to enter into it, is already there, but my query is pulling CURRENT dates. Do I need to remove some rows from my database in order to move forward with fresh data? 

Alteryx Certified Partner
Alteryx Certified Partner

Hi @CourtneyBitt

Have you checked you actual output for that duplication?

Maybe a Filter can give you a quick view of this


tl;dr - create a new field that is always changing so that it updates the record in mysql


Definitely late to the game here, but i was having issues with this recently and some pieces that i think helped (not exactly sure why) are:

field types are exactly the same (along with size)

you are inserting the same fields (order doesn't matter)


All of the above is what you've probably already seen in other forums along with correct collation, etc...


BUT the solution that made the biggest difference is making sure SOMETHING changes when you update a record. For this, i use a new field "update_datetime" and i just overwrite the value with the datetimestart() value (or heck, even a random number would work here). It forces the database to update the entire record even nothing material has changed.