Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0004097: Router convertToReload that converts multiple changes into a
reload batch
- Loading branch information
Showing
3 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
symmetric-assemble/src/asciidoc/configuration/routers/convertToReload.ad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
===== ConvertToReload Router | ||
|
||
This router converts multiple change events into a single reload event, which can be used to sub-set data quickly | ||
when the subselect router is too slow or when the lookuptable router can't handle the amount of lookup data. | ||
ConvertToReload inserts the primary key values for each row, along with a unique load ID, into a temporary table. | ||
The reload event uses the initial load SQL along with a join to the temporary table to retrieve the changes | ||
and sub-set data. | ||
|
||
The router expression requires the name of the temporary table to use: | ||
|
||
---- | ||
temptable=mytable_router | ||
---- | ||
|
||
.Sample Use Case for ConvertToReload Router | ||
==== | ||
|
||
[source, SQL] | ||
---- | ||
create table mytest (id integer, name varchar(50), primary key(id)); | ||
create table mytest_router (id integer, load_id integer, primary key(load_id, id)); | ||
insert into SYM_ROUTER (router_id, | ||
source_node_group_id, target_node_group_id, router_type, | ||
router_expression, create_time, last_update_time) values | ||
('corp-2-store','corp', 'store', 'convertToReload', 'temptable=mytest_router', current_timestamp, | ||
current_timestamp); | ||
---- | ||
|
||
==== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters