How to configure Initial Load by using ricds?
Trigger has a type of Dead Trigger, which has many usage instructions. You can refer to its definition. One of them is to restore the initial load of a one-way synchronization table. That is to say, to initiate an initial load, you need to create a Dead Trigger.
1. Create a channel
insert intosym_channel(channel_id,processing_order, max_batch_size, enabled, description)values('sale_transaction', 1, 100000, 1,'sale_transactional data from register and back office');
2. Create a Dead Trigger and add the table for the initial load to the channel. The direction of the initial load is unidirectional.
insert intosym_trigger(trigger_id,source_table_name,channel_id,sync_on_insert, sync_on_update, sync_on_delete, last_update_time,create_time)values('sale_transaction_dead','sale_transaction','sale_transaction',0,0,0,current_timestamp,current_timestamp);
3. Create a Router
insert intosym_router(router_id,source_node_group_id,target_node_group_id,router_type,create_time,last_update_time)values('store_2_corp', 'store', 'corp','default',current_timestamp, current_timestamp);
4. Create a trigger-router combination
insert intosym_trigger_router(trigger_id,router_id,initial_load_order,last_update_time,create_time)values('sale_transaction_dead','store_2_corp', 200,current_timestamp, current_timestamp);
After four steps above, after one node is registered to another, the next step is the initial load process. To load data again, run the following command on the node that outputs data during the initial load process:
../bin/symadmin --engine corp-000reload-node 001