3. Manage BDomain Metadata of a CDC Watcher¶
Make sure that the BDomain and its DBI settings exist:
Make sure that the CDC group and its watcher exist:
3.1. Add BDomain-Specific Metadata to a CDC Watcher¶
To add BDomain-specific metadata to a CDC watcher, use API_DBIADM.ADD_CDCG_BD:
- p_src_db_name and p_src_connection
Source database and Exasol connection; only needed if the watcher expression reads from a source table.
- p_bdate_change_offset
Offset in hours on top of the business day change at which a load is forced.
- p_src_where_clause
Optional
WHEREcondition, e.g. to separate BDomains within the same source table.- p_active
Activates or deactivates the watcher for this BDomain (default false).
- p_cdcg_min_intv
Minimum interval in minutes between two evaluations of the watcher (default 1), e.g. to reduce the load on the source.
Example: Add the Watcher for BDomain ‘TESTING’
1EXECUTE SCRIPT API_DBIADM.ADD_CDCG_BD(
2 'tst_cdc_grp' -- p_cdc_group
3 ,'TESTING' -- p_bdomain
4 ,null -- p_src_db_name
5 ,null -- p_src_connection
6 ,null -- p_bdate_change_offset
7 ,null -- p_src_where_clause
8 ,false -- p_active
9 ,null -- p_cdcg_min_intv (default 1)
10);
This command creates a new entry in the table DBIADM.DBI_CDCG_BD.
CDC_GROUP |
BDOMAIN |
SRC_DB_NAME |
SRC_CONNECTION |
BDATE_CHANGE_OFFSET |
SRC_WHERE_CLAUSE |
ACTIVE |
CDCG_MIN_INTV |
|---|---|---|---|---|---|---|---|
tst_cdc_grp |
TESTING |
(null) |
(null) |
(null) |
(null) |
false |
1 |
3.2. Modify BDomain-Specific Metadata of a CDC Watcher¶
Modify the watcher using API_DBIADM.MODIFY_CDCG_BD. NULL leaves a parameter unchanged, while a blank (’ ‘) restores its default value. In the following example the watcher is activated; all other parameters stay the same.
Example: Activate the Watcher
1EXECUTE SCRIPT API_DBIADM.MODIFY_CDCG_BD(
2 'tst_cdc_grp' -- p_cdc_group
3 ,'TESTING' -- p_bdomain
4 ,null -- p_src_db_name
5 ,null -- p_src_connection
6 ,null -- p_bdate_change_offset
7 ,null -- p_src_where_clause
8 ,true -- p_active
9 ,null -- p_cdcg_min_intv
10);
The entry in DBIADM.DBI_CDCG_BD has changed:
CDC_GROUP |
BDOMAIN |
SRC_DB_NAME |
SRC_CONNECTION |
BDATE_CHANGE_OFFSET |
SRC_WHERE_CLAUSE |
ACTIVE |
CDCG_MIN_INTV |
|---|---|---|---|---|---|---|---|
tst_cdc_grp |
TESTING |
(null) |
(null) |
(null) |
(null) |
true |
1 |
To switch the watcher of a BDomain on or off without changing other settings, use API_DBIADM.TOGGLE_CDCG_BD.
3.3. Remove BDomain-Specific Metadata from a CDC Watcher¶
To remove the BDomain-specific metadata of a CDC watcher, use API_DBIADM.REMOVE_CDCG_BD.
Example: Remove the Watcher for BDomain ‘TESTING’
1EXECUTE SCRIPT API_DBIADM.REMOVE_CDCG_BD(
2 'tst_cdc_grp' -- p_cdc_group
3 ,'TESTING' -- p_bdomain
4);
The entry for the CDC group ‘tst_cdc_grp’ and the BDomain ‘TESTING’ is removed from DBIADM.DBI_CDCG_BD.