Anyone have an example of how to set multiple repl...
# getting-started
a
Anyone have an example of how to set multiple replication-keys ? (is that possible ??)
a
Not possible today in the SDK, and struggled unsuccessfully to think of a valid use case during the SDK design.
Do you have a use case?
a
I might actually be misunderstanding the role of the replication key a bit. I’m trying to figure out if I should be using something like
id
or
updated_at
.. I’m assuming that if I use
id
then I will never pick up changes to previously seen id’s…. but if I use
updated_at
then I will start duplicating previous seen id’s with newer version and have to handle the dedup logic downstream ?
a
Yes, the two keys you'll want to set are: •
key_properties
- aka primary key, used in merging results downstream in the target •
replication_key
- aka incremental key, used in detecting the changed records (this is the key that gets bookmarked in the
STATE
object)
So, in your example probably: • key_properties =
["id"]
• replication_key =
"updated_at"
Is that helpful?
a
Absolutely
Thank you @aaronsteers!
a
Great to hear it!