ben_theunissen
06/14/2023, 11:30 AMSQLSink
base class with SQLAlchemy, I am hoping to find the current "best example" of a Meltano SDK Target that is supporting key-based replication, and if there are any unit tests for key-based incremental replication that I could pull in from the Singer SDK. Ive taken a look at the Meltano Target Postgres but I am not sure if that currently supported key-based replication from looking at the code.visch
06/14/2023, 1:15 PMtap | target
, records are sent over stdout to the target. The target doesn't know about anything but the SCHEMA message, RECORD message, and STATE message.
Which means you don't have to build special handling in the target for "key based replication", that's called "INCREMENTAL" streams which is a tap concern, not a target concern (or at least it shouldn't be a target concern, I've created a target that only handles full table loads which is a seperate issue)
https://github.com/MeltanoLabs/target-postgres is a good example I think, note there's a PR open that's refactoring to using SQL Alchemy for more stuff that you should just steal from imo (eventually this stuff will make it to the SDK I hope!)ben_theunissen
06/14/2023, 1:24 PMvisch
06/14/2023, 1:25 PMpat_nadolny
06/15/2023, 11:22 AM