The Aardappel is an lightweight CDC receiver for consistent asynchronous replication of data changes between YDB databases. It is designed to simplify integration between different applications which use the YDB database for persistent storage, or the independently maintained/upgraded instances of a same application.
The Apprdappel pod receives CDC streams from a source YDB database, restores linearizability of transaction using heartbeat info, and applies modifications atomically into the target YDB database.
YDB_EXEC="ydb -e <DATABASE_ENDPOINT> -d <DATABASE_NAME>"
${YDB_EXEC} 'alter table <TABLE_NAME> add changefeed <CDC_NAME> with (format="JSON", mode="UPDATES", virtual_timestamps=true, resolved_timestamps = Interval("PT1S"));'
${YDB_EXEC} 'alter topic <TABLE_NAME>/<CDC_NAME> add consumer <CDC_CONSUMER_NAME>;'
Just run
go build