Skip to content

Support DELETE -> INSERT as an option for applying a staging batch #212

@george-zubrienko

Description

@george-zubrienko

Some sources do not indicate that an UPDATE has occurred, but instead simply send an updated state of a record. This wouldn't be a problem for the merge, but consider this example:
Input 1:

Image

Input 2, some time later:

Image

Desired outcome here is to have only 1 row from the second input. Now, assuming we use location,product,segment as primary keys, first issue here would be selecting essentially a random record for insert. Moreover, in this case the real PK is location,product,segment,availableFrom which means we'll keep both records from Input 1.

Later on, since Input 2 is meant to replace data, we'll end up updating record 1 but keeping record two.

Fundamental issue with this type of source is, of course, the way it treats primary keys. Essentially updates are dumped on location,product,segment level, but real PK for the input/target is location,product,segment,availableFrom.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions