GitHub
11/08/2024, 9:47 PMAll top level bookmarks in the STATE json object should be considered atomic and mergeable with other top-level bookmarks.In practice, this convention is already true for 99% of taps. The implications are that, if the STATE output from one job contains a top-level
users bookmark, and the STATE output from another job contains a top-level customers bookmark, the two job outputs may be merged together to create a single merged STATE output with both users and customers bookmarks combined.
Compatibility Detection
As noted above, we can probably assume all taps already support this capability and then manage to the exceptions. If we do not take this assumption, detecting/confirming compatibility should still be simple step to accomplish, since we can check top-level boookmarks to see that they matching the name of the streams which were synced in the executed job.
Limitations
This method has the limitation of not being able to merge partitioned state. Optionally, we could expand the definition above to encompass multiple partition states within the jobs' STATE outputs.
Spec Proposal B: JSON Patch
A more complex spec proposal might implement the JSON Patch implementation for more advanced merging: http://jsonpatch.com/
This is likely not true today for most taps. There could still be valuable to enable this capability in order to support more advanced use cases
meltano/meltanoGitHub
11/08/2024, 9:47 PM