Yosua Lijanto Binar
Yosua Lijanto Binar

Reputation: 670

SymmetricDS Two Way Sync via Column Match Router

I have 3 nodes, 1 is host (called 'A') and 2 are guest (called 'B' and 'C') that refer to the host.

One day, 'A' send data to 'B' via Column Match Router, unfortunately 'A' is wrong. 'A' should send data to 'C', but the data have been recorded in 'B' and also in 'C' (after resent to 'C').

How to delete data in 'B'? Or the other question is how to make two way sync via column match router? At the end, I want to sync host and targeted guest, even if I fix the row so there is no "not-related-column" in wrong node.

Thank you

Upvotes: 1

Views: 298

Answers (1)

Boris Pavlović
Boris Pavlović

Reputation: 64632

Use Subselect Router:

A 'subselect' router can be used in these cases. A 'subselect' is configured with a router expression that is a SQL select statement which returns a result set of the node ids that need routed to. Column tokens can be used in the SQL expression and will be replaced with row column data.

Use:

symadmin send-sql --node B mytable "delete from mytable where id = 257"

to delete mistakenly sent data on the node B.

Upvotes: 2

Related Questions