Apply or Move a Snapshot Label

Use this API to apply a snapshot label to some or all tables and/or views in a Work Area.

Name

CDR_PUB_EXE_SNAPSHOT.SetOrMoveLabel

Signature

PROCEDURE SETORMOVELABEL( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_WA_COMPANY_ID   IN CDR_NAMINGS.COMPANY_ID%TYPE,   
  PI_WA_OBJ_ID       IN CDR_NAMINGS.OBJ_ID%TYPE,
  PI_WA_OBJ_VER      IN CDR_NAMING_VERSIONS.OBJ_VER%TYPE,
  PI_LABEL           IN CDR_TAB_REF_LABELS.LABEL%TYPE,
  PI_FORCE_FLAG       IN CDR_SUBMISSIONS.FORCE_EXECUTION_FLAG_RC%TYPE,
  PI_BLIND_FLAG IN CDR_TABLE_REF_JOBS.BLIND_BREAK_FLAG_RC%TYPE,
  PI_DATE IN DATE DEFAULT NULL,
  PI_SRC_TAB_COLL CDR_SRC_TABLE_COLL DEFAULT NULL,
  PI_WA_TABLES_COLL  IN OUT NOCOPY CDR_WA_TABLES_COLL,
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters. See Functional Rules below for more information.

  • PI_WA_COMPANY_ID (Mandatory) Enter the Company ID.
  • PI_WA_OBJ_ID (Mandatory) Enter the Work Area object ID.
  • PI_WA_OBJ_VER (Mandatory) Enter the latest object version.
  • PI_LABEL (Mandatory) Label text.
  • PI_FORCEFLAG (Mandatory)
    • If set to $YESNO$YES, the API overwrites the previous snapshot label.
    • If set to $YESNO$NO the label is not applied.
  • PI_BLIND_FLAG (Mandatory) The Blind Break flag ($YESNO$YES, $YESNO$NO).
  • PI_DATE (Optional) If this value is used, the API labels only those tables with latest data loads less than or equal to entered value.
  • PI_SCR_TAB_COL (Optional) Naming details of source table(s) of view in given Work Area and corresponding view naming details (to match value with CDR_WA_TABLES_COLL).

    This parameter is of type CDR_SRC_TABLE_OBJ_TYPE and contains the following naming attributes:

    • SRC_TI_COMPANY_ID NUMBER(6) Enter the Table or view Company ID.
    • SRC_TI_OBJ_ID NUMBER(22) Enter the Table or view object ID.
    • SRC_TI_OBJ_VER NUMBER(7) Enter the Table or view object version.
    • SRC_TI_LABEL VARCHAR2(4000) Source table's already applied label to any given load.
    • VW_TI_COMPANY_ID NUMBER(6) Enter the view Company ID.
    • VW_TI_OBJ_ID NUMBER(22) Enter the view object ID.
    • VW_TI_OBJ_VER NUMBER(7) Enter the view object version.
  • PI_WA_TABLES_COLL (Optional) This is a parameter of type CDR_WA_TABLES_TYPE that contains table naming attributes.

    Use this parameter if the API call is intended to set the label for only a subset of table(s) of an Work Area. It contains following naming attributes:

    • TI_COMPANY_ID NUMBER(6) Table COMPANY_ID to which label need to be set.
    • TI_OBJ_ID NUMBER(22) Enter the object ID for the Table for which the label needs to be set.
    • TI_OBJ_VER NUMBER(7) Enter the object version for the Table for which the label needs to be set.
    • TI_RET_STATUS VARCHAR2(4000) This is return status, should be passed as null.

Functional Rules

The following rules outline the API's behavior depending on parameter usage in the API call:

  • If PI_WA_TABLES_COLL is used, it will apply the label only to the entered table(s) and/or view(s).
  • If PI_WA_TABLES_COLL is null, the label is applied to all table(s)/view(s) in the Work Area.
  • Multiple labels cannot be applied to the same table/view in one API call.
  • If PI_DATE is used, the label is applied to the latest Table data load, less than equals to the used date.
  • If PI_DATE is not used, the label is applied to latest Table data load.
  • If PI_FORCEFLAG is set to $YESNO$YES, the API overwrites the Snapshot Label if already applied, otherwise the label is not applied.
  • If PI_FORCEFLAG is set to $YESNO$YES, non-blinded Tables are always included to be labeled.
  • If PI_SRC_TAB_COLL is null, and PI_WA_TABLES_COLL has view information or is null (if view exists), the view is loaded and labeled with latest loaded data from the source table.
  • If PI_SRC_TAB_COLL has a partial set of source table or views, and PI_WA_TABLES_COLL has view information, the view is loaded and labeled with the latest loaded data from the source table that has non-passed source information.
  • If PI_SRC_TAB_COLL is used, the view details should be part of PI_WA_TABLES_COLL.
  • If PI_SRC_TAB_COLL is null label will be applied to all table(s) in given Work Area.
  • If collection PI_SRC_TAB_COLL is passed with source table's label then view will be loaded and labeled with that data of source table.
  • If PI_SRC_TAB_COLL is used with the source table's label as null, then the view is loaded and labeled with latest loaded data of source table.