user1615573
user1615573

Reputation: 315

symmetricDS node_select

I am trying out SymmetricDS and very new at this. There are two questions I have:

Master Client Node 1 (location_id = 001) Client Node 2 (location_id = 002)

The table structure I have: tbl_customer (customer_id, first_name, last_name) tbl_customer_details (customer_id, location_id, details)

1) When syncing Master to Client Nodes, how do I sync tbl_customer where data is in a certain location_id? As you can see from our structure, in SQL we have to join tbl_customer to tbl_customer_details on customer_id where location_id = X How can I tell SymmetricDS to sync accordingly and how do I designate each client node with a location ID?

2) Is it possible to sync from a view on client node to a table on master or can it only be from table to table?

Upvotes: 1

Views: 107

Answers (1)

Boris Pavlović
Boris Pavlović

Reputation: 64632

1) Use sym_router table's column router_type with value subselect and then in the column router_expression write an SQL snippet c.external_id in (SELECT_STATEMENT_RETURNING_LOCATION_IDS) for both tbl_customer and tbl_customer_details.

2) If the database implementation allows defining triggers for the views and SymmetricDS supports it then yes, it's possible.

Upvotes: 1

Related Questions