david_tout
07/06/2021, 8:24 AMtap-mssql
Is syntax such as this normal?
select_sql += " WHERE \"{}\" >= %(replication_key_value)s ORDER BY \"{}\" ASC".format(
This is from sync_strategies.incremental.sync_table()
We can see that it grabs data greater than or equal to the current bookmark.
Shouldn't it just be greater than?
I'm finding that the same few records are getting inserted over and over again in my target. I can filter but it's annoying.david_tout
07/06/2021, 10:03 AMdavid_tout
07/06/2021, 10:03 AMvisch
07/06/2021, 12:26 PMvisch
07/06/2021, 12:27 PMdouwe_maan
07/06/2021, 2:37 PMincremental replication mode intentionally duplicates the last-emitted record to guard against race conditions.
aaronsteers
07/06/2021, 8:16 PM>=
logic is necessary to make sure we don't capture duplicates and (2) it sure would be nice if a dedupe algorithm existed that would make this easier to work with downstream. So.... here's a possible proposal which combines greater-than-or-equal-to logic with a dedupe algorithm focused just on keeping track of which ties have been seen so far for the max value.
I've actually been meaning to log this for a while and was finally inspired through this thread. If anyone wants to review this spec proposal, more eyeballs are much appreciated.
Spec proposal for duplicate-proof incremental replication (#162) · Issues · Meltano / Meltano SDK for Singer Taps and Targets · GitLab
Standard disclaimer: no promises that this will be built - this is still in thought-experiment stage for review/discussion.david_tout
07/06/2021, 11:53 PMhashdiff
field.david_tout
07/06/2021, 11:57 PM>=
)david_tout
07/06/2021, 11:58 PMaaronsteers
07/07/2021, 12:23 AMdavid_tout
07/07/2021, 12:30 AMpipeline-tap-mssql
has some smarts to detect the is-view
attribute and then read from view-key-properties
instead. That all makes sense but I found another bug that meant if you left table-key-properties
blank, the import would fail as it was a required field. This tricked me into thinking that I should use table-keys
and not view-keys
, and using both seemed...wrong.
In my PR I have updated the logic to properly use view-keys
for views and table-keys
for tables and it works a treat for upserts now.david_tout
07/07/2021, 12:31 AM