...
Table of Contents | ||
---|---|---|
|
Failures and Possible Solutions
Normal Entities
...
Conflicts
Type | Description | Solutions |
---|
Challenges
Solutions(NO)
Example | |
---|---|
UNIQUE |
|
|
Genarate
Replace all
objectReference
Erstatt alle objektreferanser
PK
An object with this primary key already exists
Single PK only for now
Genarate if UUID
Replace all
FK
How to handle composite PK?
Should we generate other types? If so then how?
Erstatt alle fremmednøkler
Input from the user
Requires user interaction
Unique
An object with this value for this field already exists
Genarate if UUID
Should we generate other types? If so then how?
Input from the user
Requires user interaction
Set null
if nullable
FVP Unique
An object with this value for this field already exists
Root entities only for now
Genarate
Input from the user
Requires user interaction
Set null
if nullable
FK
The parent object not found
Not yet supported
Set null
if nullable
Input from the user
Requires user interaction
|
| There is an object of entity A with AMID There is an entity A which has a field | |
FK |
|
| Entity A has a sub-entity Entity B. Entity B then will have a field like |
REQUIRED |
|
Genarate
Generate dummy values if not UUID or FVP
|
| Entity A has a primary key field |
TYPE |
|
Genarate
Generate dummy values if not UUID or FVP
Input from the user
Requires user interaction
Set null
if nullable
| Entity A has a field |
LENGTH |
|
Trim extra
Input from the user
Requires user interaction
Set null
if nullable
System Entities
For this section, we need to consider the system root entities like AKTOR, TAG, etc. and ignore AMID/PK
conflicts for all sub-entities. We have added options for handling AMID/PK/Unique/FVP Unique conflicts for the system root entities.
Failure
Solutions
Challenges
AMID/PK/Unique/FVP Unique conflict
|
| Entity A has a | |
Root System Entity UNIQUE |
|
| The system already has an AKTOR with |
Solutions
Type | Description | Challenges |
---|---|---|
GENERATE |
|
|
SET_BY_USER |
|
|
SET_NULL |
| |
SET_NULL_OR_REGENERATE |
| |
TRIM_EXTRA |
| |
IGNORE |
|
|
|
Highest precedence
Replace with the conflicted row
objectReference
and FK
REPLACE_WITH_EXISTING |
|
|
2nd highest precedence
|
FAIL |
|
Implementation
We can divide the implementation into four key steps.
...
After clicking the Resolve button a new tab will be opened. In the tab, there will be options to choose how do you want to proceed. There will be options present per conflict type. Either you can gather the conflicts beforehand, or gather and solve them while importing, and the third option is to mix both, meaning gather some types beforehand but resolve the rest while importing.
Conflict Type | Default Solutions (Used while importing) | Description |
---|---|---|
AMID | Generate |
|
Fail |
| |
PK | Generate |
|
Fail |
| |
Unique | Generate |
|
Fail |
| |
FVP Unique | Generate |
|
Fail |
| |
FK (Not supported yet) | Set Null |
|
Fail |
| |
Required | Generate |
|
Fail |
| |
Wrong Type | Set Null or Generate |
|
Fail |
| |
Wrong Length | Trim Extra |
|
Fail |
| |
System Entity | Generate |
|
Ignore |
| |
Replace with the conflicted row |
| |
Fail |
|
...
If all the types are set to resolve at import time then the Resolve and Import
button will be shown. In this case, the 3rd step is not needed anymore. Otherwise, you can proceed to the 3rd step by clicking the Gather Conflicts
button.
...
Support Excel import
Support Composite PK Support and FK conflict
Generate other types than UUID
Optimize using temporary table and/or files rather than the memory
Add more types of solutions