Search code examples
databaseapache-iotdb

How to change the duplicated primary key to successfully insert data into Apache IoTDB?


After I tried to insert data into Apache IoTDB, the data cannot be inserted into the time series and error 1062 is reported: Duplicate entry 'B0001' for key 'bank.PRIMARY'. I understand that the primary key is duplicated from this error message, but what I don't understand is that to solve this duplicated primary key problem, what action should I do? Do I need to bank id columns changed to B0001 and then try to insert the data again?


Solution

  • You need to check whether the data you want to insert (the duplicated one) already exists in the Apache IoTDB database. If it already exists, you can delete this data column and insert the other data for the time series again, and the error should not be reported.