1. Manage a CDC Group¶
A change data capture (CDC) group combines source objects that are loaded together whenever its watcher detects a change.
1.1. Add a CDC Group¶
Add a CDC group using API_DBIADM.ADD_CDC_GROUP.
Example: Add the CDC Group ‘tst_cdc_grp’
1EXECUTE SCRIPT API_DBIADM.ADD_CDC_GROUP(
2 'tst_cdc_grp' -- p_cdc_group
3 ,'Test CDC group for Person' -- p_description
4);
This command creates a new entry in the table DBIADM.DBI_CDC_GROUPS.
CDC_GROUP |
DESCRIPTION |
|---|---|
tst_cdc_grp |
Test CDC group for Person |
1.2. Modify a CDC Group¶
Use API_DBIADM.MODIFY_CDC_GROUP to change the description.
Example: Change the Description
1EXECUTE SCRIPT API_DBIADM.MODIFY_CDC_GROUP(
2 'tst_cdc_grp' -- p_cdc_group
3 ,'Changed description' -- p_description
4);
The entry for the CDC group ‘tst_cdc_grp’ in DBIADM.DBI_CDC_GROUPS has changed:
CDC_GROUP |
DESCRIPTION |
|---|---|
tst_cdc_grp |
Changed description |
1.3. Remove a CDC Group¶
Remove a CDC group with API_DBIADM.REMOVE_CDC_GROUP. If a BDomain is passed, the CDC group is only removed for this BDomain; with NULL it is removed completely.
Example: Remove the CDC Group Completely
1EXECUTE SCRIPT API_DBIADM.REMOVE_CDC_GROUP(
2 'tst_cdc_grp' -- p_cdc_group
3 ,null -- p_bdomain
4);
The entry for the CDC group ‘tst_cdc_grp’ is removed from DBIADM.DBI_CDC_GROUPS.
1.4. Trigger a CDC Group Manually¶
To load all loaders of a CDC group immediately, independent of its watcher, use API_DBIADM.TRIGGER_CDC_GROUP. A single loader can be triggered with API_DBIADM.TRIGGER_LOADER. Both require the business date to be loaded.
Example: Trigger the CDC Group for BDomain ‘TESTING’
1EXECUTE SCRIPT API_DBIADM.TRIGGER_CDC_GROUP(
2 'tst_cdc_grp' -- p_cdc_group
3 ,'TESTING' -- p_bdomain
4 ,'2024-01-01' -- p_bdate
5);