Create a Validation Check
Use this API to create a validation check.
Name
DME_PUB_VALIDATION_CHECK.CreateValidationCheck
Signature
PROCEDURE createValidationCheck ( p_api_version IN VARCHAR2 , p_init_msg_list IN VARCHAR2 DEFAULT CDR_PUB_DEF_CONSTANTS.G_FALSE , p_commit IN VARCHAR2 default CDR_PUB_DEF_CONSTANTS.G_FALSE , p_validation_level IN NUMBER default CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL , x_return_status OUT NOCOPY VARCHAR2 , x_msg_count OUT NOCOPY NUMBER , x_msg_data OUT NOCOPY VARCHAR2 , pi_xFormMapColl in out nocopy dme_xform_map_ex_coll , pi_vcBatchModelObj in cdr_base_obj_type , pi_VcSecondaryVarColl in dme_vc_secondary_var_obj_coll default null , pi_VcRunMode in VARCHAR2 default 'FULL' );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PI_XFORMMAPCOLL (Mandatory). This is a parameter of collection type
DME_XFORM_MAP_EX_COLL. DME_XFORM_MAP_EX_COLL is a table of
DME_XFORM_MAP_EX_OBJ_TYPE.
This collection is prepared with both Table level amd Column Level maps. Validation Checks Details are set at Table level mapping.
The following attributes from DME_XFORM_MAP_EX_OBJ_TYPE are required for this API:
- NAMING: Table type CDR_NAMING_VERSION_OBJ_TYPE
For Table Level mapping and Validation Checks Create, mandatory attributes are:
- COMPANY_ID
- NAME - Refers to Validation Checks name
- OBJECT_TYPE_RC - Enter the value: '$OBJTYPES$XFORMMAP'.
For Column Level mapping and Validation Checks Create, mandatory attributes are:
- COMPANY_ID
- OBJECT_TYPE_RC - Enter the value: '$OBJTYPES$XFORMMAP'.
- MAP_TYPE. Enter '$MAPTYPE$VC
- XFORM_TYPE. Enter '$XFORMTYPE$DIRECT 'for single source table and '$XFORMTYPE$JOIN' for multiple source table.
- PROGRAM_ID. If the validation check uses a custom program, enter the Program obj_id, else leave blank.
- PROGRAM_VER. If the validation check uses a custom program, enter the Program obj_ver, else leave blank.
- PROGRAM_TYPE. 'CUSTOM' for Custom program. Else leave blank. When creating Validation Checks using Custom Program, column level maps are not required in the collection parameter (PI_XFORMMAPCOLL).
- AUTH_FLAG_RC. Enter '$YESNO$YES' to authorize Validation Checks listing to read blinded data. Otherwise leave blank. It defaults to '$YESNO$NO'.
- OPERATION_TYPE. '$OPER$CREATE' for Validation Checks create.
- MAP_ENTITY_COLL. Its collection type
DME_MAP_ENTITY_COLL which is table of DME_MAP_ENTITY_OBJ_TYPE type.
For table level mapping, only source entities are required in MAP_ENTITY_COLL collection. Enter COMPANY_ID, DATAENTITY_ID, DATAENTITY_VER, MAP_RELATION as SOURCE, expression details (see Create or Modify an Expression,) and OPERATION_TYPE as '$OPER$CREATE'.
For column level mapping, both source and target entities are required in MAP_ENTITY_COLL collection. For source entities, enter company_id, dataentity_id,dataentity_ver, map_relation as SOURCE,expresion details and operation_type as '$OPER$CREATE' and for target entity, enter ALIAS, map_relation as TARGET and operation_type as '$OPER$CREATE'.
- JOIN_COLL. Required only for VC using multiple
source tables. This is a collection of type CDR_DM_JOIN_OBJ_COLL. Set
only in table level mapping.
CDR_DM_JOIN_OBJ_COLL is table of type CDR_DM_JOIN_OBJ_TYPE.
CDR_DM_JOIN_OBJ_TYPE is for Table Joins and set the source and target table ids. This object type has an attibute of collection type DM_JOIN_COL_OBJ_COLL for column joins.
DM_JOIN_COL_OBJ_COLL is table of type CDR_DM_JOIN_COL_OBJ_TYPE. Table and Column related fields are required along with JOIN_OPERATOR_RC. For POSITION enter 1.
- VC_DETAILS. Table of dme_val_check_details_obj_type.
Set only in table level mapping.
COMPANY_ID, DISC_OPEN_STATE, DISCREPANCY_TEXT, PRIMARY_SOURCE_COLUMN_ID are mandatory. AUTO_CLOSE_FLAG,CATEGORY_ID and INITIAL_DISC_ACTION_ID are optional.
- DISC_OPEN_STATE. Possible values are '$DISC_STATES$OPEN' and '$DISC_STATES$CANDIDATE'.
- DISCREPANCY_TEXT. Enter a text as comment for created discrepancies from Validation Checks.
- PRIMARY_SOURCE_COLUMN_ID. Source Column OBJ_ID on which discrepancy is created.
- AUTO_CLOSE_FLAG. Possible values are '$YESNO$YES' and '$YESNO$NO'. Enter '$YESNO$YES', if Validation Check can auto close the discrepancy.
- CATEGORY_ID. Enter a valid Validation Check category Id from DME_CATEGORIES.
- INITIAL_DISC_ACTION_ID. : If discrepancies need DM review, enter 31 when DISC_OPEN_STATE='$DISC_STATES$CANDIDATE' or enter 32 when DISC_OPEN_STATE='$DISC_STATES$OPEN'.
- PI_VCBATCHMODELOBJ (Mandatory). This is a parameter of table type CDR_BASE_OBJ_TYPE. Enter values to identify the Validation Checks Batch Model under which you want to create Validation Checks.
- PI_VCSECONDARYVARCOLL (Optional). This is a parameter of collection type
DME_VC_SECONDARY_VAR_SECONDARY_VAR_OBJ and DME_VC_SECONDARY_VAR_OBJ_COLL is a
table type of DME_VC_SECONDARY_VAR_OBJ_TYPE. Enter the validation check column
details where you want to set the secondary flag variable as Yes. Mandatory
attribute types are:
- DM_COL_OBJ_ID - Add the source column object ID that mapped to the validation check column.
- VC_COLUMN_NAME - Enter the validation check display column name.
Note:
This only applies to validation checks created without a custom program. For custom validation checks, define the secondary columns in Oracle LSH by adding $DMWVCSECONDARYVAR$ at the end of any text in the Description field of the target table column. (Or, just add it to the Description field without any other text.)
- PI_VCRUNMODE (Optional). Enter "FULL" for All Source Data and "INCR" for New OR Updated Source Data. The default value is "FULL".
Parent topic: Create and Modify Validation Checks and Batches