How to synchronize data from a table by using ricds?
1. Create a channel
insert into sym_channel(channel_id, processing_order, max_batch_size, enabled, description)values('test', 1, 100000, 1, 'channel test for table test')
A channel is a set of one or more tables to be synchronized in a transaction.
2. Create a Trigger for the table to be synchronized
insert into sym_trigger(trigger_id,source_table_name,channel_id,last_update_time,create_time)values('test','test','test',current_timestamp,current_timestamp);
Create a synchronization Trigger (and a Dead Trigger) for each table and put the table in a channel.
3. Create a Router
insert into sym_router(router_id,source_node_group_id,target_node_group_id,router_type,create_time,last_update_time)values('test_2_test', 'corp', 'store', 'default',current_timestamp, current_timestamp);
Create a Router with the concept of direction. Data can also be filtered.
4. Create a Trigger-Router Link
insert into sym_trigger_router(trigger_id,router_id,initial_load_order,last_update_time,create_time)values('test','test_2_test', 100, current_timestamp, current_timestamp);
You need to associate the Trigger with the Router, that is, pass the data obtained by the Trigger to the Router, and then the Router sends the data to other nodes. Trigger and Router are many-to-many relationships. Therefore, a Join table is required. This is the Join table.