Support Article
Data table duplicate entries while migrating code
SA-16576
Summary
User has two environments, development and QA. User deployed an application consisting of data table and its instances from development to QA using Rule-Admin-Product (RAP).
Later in development environment, user has built more features and added few entries to data table and modified existing entries.
Now user is in the process of building RAP for that delta. After RAP is created, further modified the RAP to create a 'select query' to select only specific instances of data table and deployed into QA.
Now observing that instead of updating the existing entries in data table, it is creating duplicate entries for updated records.
User does not have the log files on the day RAP was deployed.
Error Messages
Not Applicable.
Steps to Reproduce
- Create Datatable with some entries in it. Let's assume TableName is TestTable.
- Create R-A-P in dev environment and import it to QA.
- Add one more record to the TestTable in which Primary key column name is Label(Label=11).
- Create R-A-P to include newly created record(Label=11) and imported it to QA environment again.
- Now records in QA env would be 11 records. We can see 11 records as expected.
- Modify the values of some column other than primary key of 11th record in dev(Still Label=11). Let's say change the value from A to B. Refer step8.
- Repeat step4. Now records should be 11 as Primary key will be the same as user modified the value of different column than Primary key column. However when user imports the new R-A-P to QA environment one can see 12 records present in TestTable data table instead of 11 records.
- Label Name
11 B Changed one
- If user removes one record which contains(Label=11) both the records are getting deleted.
Root Cause
A defect or configuration issue in the operating environment.
Data table used to create export and import does not have primary key defined in the mentioned table.
Resolution
Update the pzinskey as primary key instead of Label which resolves the issue.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.