Contribution: Last record in table field

Visto 50 veces
Saltar al primer mensaje no leído

Andrew Walker

no leída,
11 may 2022, 0:20:2411/5/22
a debezium
Hi all,

I am currently working on features that require a flag to indicate whether a record corresponds to the last row of a table. I see that RelationalSnapshotContext already holds this information, and was wondering if would make sense to add this to the OffsetContexts, similar to lastSnapshotRecord.

Any alternative solutions or details I should pay attention to would be greatly appreciated!

Kind regards,
Andrew

Andrew Walker

no leída,
11 may 2022, 1:58:3511/5/22
a debezium
Sorry, just to clarify, I actually meant create a new SnapshotRecord enum value like LAST_IN_TABLE to indicate records that are last in the table but not in the snapshot.

Mark Bereznitsky

no leída,
16 may 2022, 4:42:5516/5/22
a debezium
Hey all, bumping this up. It would be extremely useful for us to be able to tell whether a record is the last for its table, very much like we can tell that a record is the last overall in a snapshot currently.
There already is functionality for this in RelationalSnapshotChangeEventSource, it's just a matter of adding this into the snapshot context. Would this be an acceptable addition to the codebase, probably through modifying the existing SnapshotRecord to include a new enum as above?

Thank you in advance!

Chris Cranford

no leída,
16 may 2022, 8:10:2916/5/22
a debe...@googlegroups.com
Hi Mark -

I don't see any problems with adding that indicator in the source info block.  I'd also look and verify whether such a field could be added to incremental snapshots as well for consistency sake.  If you can, could you log a Jira enhancement request and would you be willing to send in an PR for it? 

Thanks,
Chris
--
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/debezium/b349cf0b-4cc1-4e00-a17a-f2e07022b1acn%40googlegroups.com.

Mark Bereznitsky

no leída,
17 may 2022, 7:36:3917/5/22
a debezium
Hey Chris, thanks for having a glance, yeah we'll get right on it!
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos