-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sink does not support update operation #16
Comments
It seems that headers in kafka message could be use to distinguish inserts and updates. That would also allow implementation of other operations like partition deletion or range deletion. It seems that we could also implement TTL per column using headers. |
Is this related to Counters @haaawk - what is the difference between an insert and update from a scylla POV? |
It's related to all types - not only counters. Difference between inserts and updates in Scylla is described here -> https://stackoverflow.com/questions/17348558/does-an-update-become-an-implied-insert/60075479#60075479 The problem also is that sink connector does not support unset values. It sets unset columns to null. For example, when there is a row
and you perform
and it should be:
This means it is impossible to represent |
So it needs to do a read before write and update all the values that are supplied and retain the values that were not supplied? I am assuming this is what will be useful for CDC? |
No. Reading before writing would be wasteful and non-performant. It just needs to support updates and unset values. In CQL operation each column can be in one of three states: have value, be null, or not be set at all. Sink connector supports only the first two. |
Another thing is that even reading before writing won't cut it because it would screw up timestamps of cells. Single CQL operation can have only one timestamp for all affected columns so you can't have unmodified columns with an old timestamp and updated columns with a new timestamp. |
ok - @haaawk is it possible to give me an example on how to do a partial update to a row ? what would the CQL/prepared statement look like? |
You have examples above. Both
|
It would be highly useful to support not only insert and delete but also update.
That would allow live migrations using Change Data Capture as a source of data.
The text was updated successfully, but these errors were encountered: