Last active
March 26, 2020 17:39
-
-
Save tzach/f8bdf87fad1a6f3177b3251ae7e0ade7 to your computer and use it in GitHub Desktop.
Scylla CDC Example
This file contains 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
docker run --name some-scylla-night -d scylladb/scylla-nightly --experimental 1 | |
docker exec -it some-scylla-night cqlsh | |
cqlsh> | |
CREATE KEYSPACE ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true; | |
CREATE TABLE ks.t (pk int, ck int, v int, PRIMARY KEY (pk, ck, v)) WITH cdc = {'enabled':true}; | |
INSERT INTO ks.t (pk,ck,v) VALUES (1,2,3); | |
INSERT INTO ks.t (pk,ck,v) VALUES (1,2,4); | |
select * from ks.t_scylla_cdc_log ; | |
cdc$stream_id | cdc$time | cdc$batch_seq_no | cdc$deleted_ck | cdc$deleted_pk | cdc$deleted_v | cdc$operation | cdc$ttl | ck | pk | v | |
------------------------------------+--------------------------------------+------------------+----------------+----------------+---------------+---------------+---------+----+----+--- | |
0x97a177ea890084b495c6e57c8a5dd1fd | 6abd2cbe-6f78-11ea-2069-c89fee9d77b2 | 0 | null | null | null | 2 | null | 2 | 1 | 3 | |
0x97a177ea890084b495c6e57c8a5dd1fd | 6dd10312-6f78-11ea-df03-ce304c8c88f1 | 0 | null | null | null | 2 | null | 2 | 1 | 4 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment