6. Manage BDomain Metadata of a Loader

Make sure that a DBI loader already exists:

6.1. Add BDomain Specific Metadata to a Loader

To add BDomain specific metadata to a loader use API_DBIADM.ADD_LOADER_BD.

Most important parameters are

  • the source connection, DB-name, schema and table name (or view name)

  • with p_active false the loader is still inactive

Example

 1EXECUTE SCRIPT API_DBIADM.ADD_LOADER_BD(
 2   'TST_PERS_LDR'   -- p_ldr_name
 3   ,'TESTING'       -- p_bdomain
 4   ,'TESTING'       -- p_src_db_name
 5   ,'SQL_SERVER'    -- p_src_connection
 6   ,'DBITSA'        -- p_tsa_schema
 7   ,'TEST_PERSON'   -- p_tsa_table
 8   ,false           -- p_active
 9   ,null            -- p_bdate_epoch
10   ,0               -- p_status_finished_offset
11   ,null            -- p_ext_bdate_sql_expr
12   ,false           -- p_bdate_ffdl_prev_day
13   ,null            -- p_src_view_gen
14   ,null            -- p_src_where_clause
15   ,false           -- p_ct_enabled
16   ,null            -- p_ct_group
17   ,null            -- p_split_max_degree
18   ,false           -- p_split_on_load_abort
19   ,99              -- p_priority
20);

After issuing the command above an entry is added to 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

6.2. Modify a BDomain Loader

To modify a BDomain loader use API_DBIADM.MODIFY_LOADER_BD. Providing NULL leaves the parameters as is, while a blank (’ ‘) restores the default value. 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.

Example

 1EXECUTE SCRIPT API_DBIADM.MODIFY_LOADER_BD(
 2   'TST_PERS_LDR'   -- p_ldr_name
 3   ,'TESTING'       -- p_bdomain
 4   ,null            -- p_src_db_name
 5   ,null            -- p_src_connection
 6   ,null            -- p_tsa_schema
 7   ,null            -- p_tsa_table
 8   ,true            -- p_active
 9   ,null            -- p_bdate_epoch
10   ,null            -- p_status_finished_offset
11   ,null            -- p_ext_bdate_sql_expr
12   ,null            -- p_bdate_ffdl_prev_day
13   ,null            -- p_src_view_gen
14   ,null            -- p_src_where_clause
15   ,null            -- p_ct_enabled
16   ,null            -- p_ct_group
17   ,null            -- p_split_max_degree
18   ,null            -- p_split_on_load_abort
19   ,null            -- p_priority
20);

This command results in a changed entry for the loader ‘PERSON’ with the BDomain ‘TESTING’ in the table DBI_LOADER_BD.

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

6.3. Remove BDomain Specific Metadata from a Loader

To remove BDomain specific metadata from a loader use API_DBIADM.REMOVE_LOADER_BD.

Example

1EXECUTE SCRIPT API_DBIADM.REMOVE_LOADER_BD(
2   'TST_PERS_LDR'   -- p_ldr_name
3   ,'TESTING'       -- p_bdomain
4);

After having issued the command above, the entry for the loader ‘TST_PERS_LDR’ for the BDomain ‘TESTING’ will have been removed from the table DBI_LOADER_BD.