TV 3.7.0
To be able to add bdomain specific metadata to a DBI loader a bdomain and a DBI loader have to exist. This can be achieved by following the HowTo Guide below and all the linked Prerequisites:
To add bdomain specific metadata to a loader the script API_DBIADM.ADD_LOADER_BD can be used. The name of the loader and bdomain that have been created by following the steps in the guide provided above before have to be provided as well as the name of the source database and the name of the connection to the source database. Furthermore, the name of the target TSA schema where the data should be loaded into as well as a name for the target table the data will be loaded into have to be set. Additionally one has to set the loader to either active or not and define a bdate epoch. One can also choose if the import should be split, if an error occurs due to a connection abort. Furthermore, a priority has to be set for each loader. The lower the value the higher the priority, therefore one can see in the example below that a rather high value and therefore low priority was chosen for this test loader.
EXECUTE SCRIPT API_DBIADM.ADD_LOADER_BD(
'TST_PERS_LDR' -- p_ldr_name
,'TESTING' -- p_bdomain
,'TESTING' -- p_src_db_name
,'SQL_SERVER' -- p_src_connection
,'DBITSA' -- p_tsa_schema
,'TEST_PERSON' -- p_tsa_table
,false -- p_active
,null -- p_bdate_epoch
,0 -- p_status_finished_offset
,null -- p_ext_bdate_sql_expr
,false -- p_bdate_ffdl_prev_day
,null -- p_src_view_gen
,null -- p_src_where_clause
,false -- p_ct_enabled
,null -- p_ct_group
,null -- p_split_max_degree
,false -- p_split_on_load_abort
,99 -- p_priority
);
After issuing the command above an entry is added to DBIADM.DBI_LOADER_BD. The table below shows some of the columns and added values of this table.
ldr_name | bdomain | src_db_name | src_connection | tsa_schema | tsa_table | active | bdate_ epoch | split_on_ load_abort | priority |
---|---|---|---|---|---|---|---|---|---|
TST_PERS_LDR | TESTING | TESTING | SQL_SERVER | DBITSA | TEST_PERSON | false | null | false | 99 |
If any of the values for a loader associated with a bdomain should be modified, this can be done by using the script API_DBIADM.MODIFY_LOADER_BD. This script only needs the name of the loader and the bdomain associated with it as well as any new values for those variables that should be modified. By providing a null value for the rest of the variables, the current values will be kept. As can be seen in the example below, only the value for the active variable should be changed, therefore a null value is used for the rest of the variables.
EXECUTE SCRIPT API_DBIADM.MODIFY_LOADER_BD(
'TST_PERS_LDR' -- p_ldr_name
,'TESTING' -- p_bdomain
,null -- p_src_db_name
,null -- p_src_connection
,null -- p_tsa_schema
,null -- p_tsa_table
,true -- p_active
,null -- p_bdate_epoch
,null -- p_status_finished_offset
,null -- p_ext_bdate_sql_expr
,null -- p_bdate_ffdl_prev_day
,null -- p_src_view_gen
,null -- p_src_where_clause
,null -- p_ct_enabled
,null -- p_ct_group
,null -- p_split_max_degree
,null -- p_split_on_load_abort
,null -- p_priority
);
This command results in a changed entry for the loader 'PERSON' with the bdomain 'TESTING' in the table DBIADM.DBI_LOADER_BD as can be seen in the table below.
ldr_name | bdomain | src_db_name | src_connection | tsa_schema | tsa_table | active | bdate_ epoch | split_on_ load_abort | priority |
---|---|---|---|---|---|---|---|---|---|
TST_PERS_LDR | TESTING | TESTING | SQL_SERVER | DBITSA | TEST_PERSON | true | null | false | 99 |
To remove bdomain specific metadata from a loader one only has to provide the name of the loader and the name of the bdomain the loader should be removed from to the script API_DBIADM.REMOVE_LOADER_BD as can be seen in the example below.
EXECUTE SCRIPT API_DBIADM.REMOVE_LOADER_BD(
'TST_PERS_LDR' -- p_ldr_name
,'TESTING' -- p_bdomain
);
After having issued the command above, the entry for the loader 'TST_PERS_LDR' with the bdomain 'TESTING' will have been removed from the table DBIADM.DBI_LOADER_BD.