Вы находитесь на странице: 1из 2

How MD_FK_REF works and steps to update it?

Ensure that the following prerequisites are met:

• You updated the Data Specifications with the new foreign key definition and mapping.

• You modified the DataHub data model with the new foreign key relationship.

• You obtained the details of the foreign key relationship, including TRF and CS table names and column
names that define the relationship.

Guidewire recommends that you disable foreign key constraints when you add them to DataHub.

Procedure

1. Add a new row into the MD_FK_REF table.

2. Enter a value in the TRF_NAME column based on how the foreign key table in FK_TAB_NAME is
sourced:

• If the foreign key table is sourced from an existing DataHub table instead of a TRF view or table, such
as the CS_BILL_COMM_AGG table, then set the TRF_NAME column to a space. Note that this column
does not allow NULL values.

• If the foreign key table is sourced from multiple TRF tables or views, set the TRF_NAME column to
MULTI.

• If the foreign key table is sourced from a single TRF table or view, set the TRF_NAME column to the
name of that TRF table or view.

3. In the FK_TAB_NAME column, enter the name of the foreign key table.

4. In the FK_COL_NAME column, enter the name of the column that contains the foreign key.

5. In the PK_TAB_NAME column, enter the name of the primary key table.

6. In the PK_COL_NAME column, enter the name of the column that contains the primary key.

7. In the FK_CONSTR_NAME column, enter the name of the foreign key constraint.

8. In the LOB_CD column, enter a code to identify the line of business that the foreign key table, which is
specified in the FK_TAB_NAME column, belongs to. Use one of the following codes:

• GL for General Liability LOB

• CA for Commercial Auto LOB

• CP for Commercial Property LOB

• PA for Personal Auto LOB

• HO for Homeowners LOB

• WC for Workers' Compensation LOB


• POLICY for a generic policy entity

• CLAIM for a generic claim entity

• BILLING for a generic billing entity

• EARNINGS for an earnings entity such as CS_EARNED_PREM_TRAN

• A space for an ETL table such as ETL_PDP_COLUMN_CONFIG. Note that this column does not allow
NULL values.

9. In the OOTB_FUTURE_USE_FL column, enter a value of N if the primary key table, which is specified in
the PK_TAB_NAME column, exists in DataHub. Otherwise, if the foreign key table exists in DataHub, but
the primary key table does not exist, then enter Y to indicate that the relationship is for future use.

10. In the MULTI_SRCE_FL column, enter a value N.

11. In the SELF_REF_FL column, enter a value N.

12. Import the updated MD_FK_REF table into Data Services.

________________________________________________________________________________

How to overcome MD_FK_REF Foreign Keys are missing error, during Init_Config job run?

1) Check for the missing foreign keys(take from your error log) in MD_FK_REF table
For instance;

SELECT * FROM MD_FK_REF WHERE FK_CONSTR_NAME IN ('FK_CHED_CACTB','FK_CHED_CHEB', 'FK_CHED_CJOBB',


'FK_CHED_CPOLB', 'FK_CHED_CUSRB', 'FK_CPUPT_CMDM', 'FK_CPUPT_CAYB','FK_CPUPT_CATB',
'FK_CPUPT_CCBA','FK_CPUPT_CPBA', 'FK_CPUPT_CPLBA', 'FK_CPUPT_CRTD', 'FK_CUWID_CPOLB', 'FK_CUWID_CUWIB')

2) Check for the Insert scripts of the missing foreign keys in CI_R2 or any latest updated DB or the
share folder.
3) Execute the insert scripts if already available or if not found create insert statements and insert
the missing FK’s.
4) Check for the PK (Primary Key) table and FK (Foreign Key) tables whether the specified FK
constraints are defined.
5) Import or Re-import those tables in your repository.
6) Also re-import the MD_FK_REF table.

Вам также может понравиться