Can I use AWS glue bookmarks to modify existing records

0

Can aws glue bookmarks be used to incrementally add newly added rows (or modify existnig ones) from each previous day to a destination table?

已提問 9 個月前檢視次數 288 次
1 個回答
0

Since you talk about modifying existing ones, I'm going to assume you are talking about JDBC bookmarks and not s3 (in s3 you cannot update rows without updating files).
You can as long as you meet the requirement of having a numeric column monotonically increasing (for instance using a column with the update timestamp/version), so the bookmark can keep track of which rows to read, and in the case of updates you have your own logic to do an upsert (for instance using a temporary table and then doing a DB upsert into the final table).

profile pictureAWS
專家
已回答 9 個月前
  • Thanks. Yes I'm talking about JDBC bookmarks. I have updatedAt columns. Can you give me more info about how they can be used with bookmarks to allow sending updated info to my db table?

  • You would need something that marks the updated rows (e.g. a trigger that updates the timestamp on the bookmark column) AND on the destination handle updates correctly (if you use something like Hudi that's done automatically, for others it might be more complicated)

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南