Created
May 6, 2020 19:32
-
-
Save PeterCorless/e59f2e8ab519fae861d083f1adda8e26 to your computer and use it in GitHub Desktop.
Introducing-Scylla-Open-Source-4.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > CREATE TABLE base_table ( | |
| pk text, | |
| ck text, | |
| val1 text, | |
| val2 text, | |
| PRIMARY KEY (pk, ck) | |
| ) WITH cdc = { ‘enabled’ = ‘true’, preimage = ‘true’ }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > insert into base_table(pk, ck, val1, val2) values(“foo”, “bar”, “val1”, “val2”); | |
| > insert into base_table(pk, ck, val1, val2) values(“foo”, “baz”, “vaz1”, “vaz2”); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Stream_id | time | batch_seq | operation | ttl | _pk | _ck | _val1(op, value, ttl)| _val2(...) | |
| ----------+--------+-----------+------------+-----+-------+--------+----------------------+--------------------- | |
| UUID1 | <time1>| 0 | UPDATE | | “foo” | “bar” | (ADD, “val1”, null) | (ADD, “val2”, null) | |
| UUID1 | <time2>| 0 | UPDATE | | “foo” | “baz” | (ADD, “vaz1”, null) | (ADD, “vaz2”, null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > update base_table set val1 = “val3” where pk = “foo” and ck = “bar”; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Stream_id | time | batch_seq | operation | ttl | _pk | _ck | _val1 | _val2 | |
| ----------+---------+-----------+------------+-----+-------+--------+----------------------+--------------------- | |
| UUID1 | <time3> | 0 | PREIMAGE | | “foo” | “bar” | (ADD, “val1”, null) | | |
| UUID1 | <time3> | 1 | UPDATE | | “foo” | “bar” | (ADD, “val3”, null) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > delete val2 from base_table where pk = “foo” and ck = “bar”; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Stream_id | time | batch_seq | operation | ttl | _pk | _ck | _val1 | _val2 | |
| ----------+---------+-----------+------------+-----+-------+--------+----------------------+--------------------- | |
| UUID1 | <time4> | 0 | PREIMAGE | | “foo” | “bar” | | (ADD, “val2”, null) | |
| UUID1 | <time4> | 1 | UPDATE | | “foo” | “bar” | | (DEL, null, null) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment