View Issue Details

IDProjectCategoryView StatusLast Update
0001816SymmetricDSBugpublic2021-08-11 15:28
Reporterjosh-a-hicks Assigned Torudiejd  
Prioritynormal 
Status closedResolutionno change required 
Summary0001816: Initial load fails at times when an create first flag is on and an alter PK occurs
DescriptionUsers send initial load to a table with no primary key or with a primary key that will change. If there is no PK and the initial load runs multiple times it creates duplicate data. So common practice is to go back and add an appropriate key to the data at the source. This change is then sent down with the next initial load (if create first parameter = true) and can not be applied with the data currently in the target.


Data is loaded to the target then on the source the primary key is added

Occurs under the flow:

Initial Load, Add new PK to a table, Initial Load

The create in this case will be
Steps To ReproduceSend initial load with the create first flag on a table without a PK
Send initial load again and duplicates will be created
Add PK to source
Resend initial load and should see failure trying to apply the key.
Additional InformationNeed to determine a way to delete data or drop table before creation. Probably through a param.
Tagsinitial/partial load

Activities

elong

2014-07-19 00:39

developer   ~0000554

In DefaultDatabaseWriter.create() it checks the DatabaseWriterSettings.isAlterTable() to decide if the table definition XML should be used to drop and create the table or to alter it. We could add an argument to the CsvData.getParsedData(CsvData.ROW_DATA)[1] to indicate if the table should be altered or not. On an initial load, we set the argument to false.

rudiejd

2021-08-11 15:27

developer   ~0001981

This can be solved by first sending a load truncating the table, then sending the initial load. This isn't really an issue considering this workaround.

Issue History

Date Modified Username Field Change
2014-07-17 15:48 josh-a-hicks New Issue
2014-07-18 11:01 chenson Project SymmetricDS Pro => SymmetricDS
2014-07-19 00:39 elong Note Added: 0000554
2019-04-22 21:29 elong Tag Attached: initial/partial load
2021-08-11 15:27 rudiejd Note Added: 0001981
2021-08-11 15:28 rudiejd Assigned To => rudiejd
2021-08-11 15:28 rudiejd Status new => closed
2021-08-11 15:28 rudiejd Resolution open => no change required