13 Tables

This is a public interface for all operations related to Tables, Columns, and Constraints; including creation, deletion, modification, and checking in and out of these objects.

This chapter contains this section:

Create and Modify Tables

This section contains the following topics:

Create a Table Definition

Use this API to create a Table definition.

Name

CDR_PUB_DF_TABLE.CreateTableDefinition

Signature

PROCEDURE CREATETABLEDEFINITION( 
  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, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_NAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE, 
  PIO_TABLE  IN OUT    CDR_TABLE_OBJ_TYPE, 
  PI_INSTANCESUBTYPEID  IN    NUMBER, 
  PI_DEFCLASSIFICATIONCOLL  IN    CDR_CLASSIFICATIONS_COLL, 
  PI_INSTCLASSIFICATIONCOLL  IN    CDR_CLASSIFICATIONS_COLL 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_NAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes. For OBJECT_TYPE_RC enter $OBJTYPES$TABLE.
  • PIO_TABLE (Optional) This is a parameter of table type CDR_TABLE_OBJ_TYPE that contains object attributes specific to Tables.

    If you are creating a new definition, enter values for the new Table. The following attributes are required: COMPANY_ID,OBJ_ID,OBJ_VER,ORACLE_NAME,SAS_NAME, SASV6FLAGRC = '$YESNO$NO', SNAPSHOTFLAGRC= '$YESNO$YES', BLINDINGFLAGRC= '$YESNO$YES', PROCESSTYPERC = '$PROCESSTYPES$STAGINGWAUDIT'

    If you are creating an instance of an existing Table, do not enter any values here.

  • PI_INSTANCESUBTYPEID (Mandatory) Enter NULL here.
  • PI_DEFCLASSIFICATIONCOLL (Optional) By default the new definition is classified according to the subtype you assigned it in the CDR_NAMING_VERSION_OBJ_TYPE.

    If you want to override the default classifications for one or more classification levels, use this parameter. This is a collection of CDR_CLA_OBJ_TYPEs, which have 5 attributes, including CLA_LEVEL_ID and CLASSIFICATION_ID.

    If you want the definition to inherit its classifications for a particular level from its parent, enter the classification level ID and, for the CLASSIFICATION_ID, enter 0 (zero).

    If you want to explicitly assign one or more terms for a particular level, initialize a CDR_CLA_OBJ_TYPE for each term, entering the classification level ID and, for the CLASSIFICATION_ID, the term ID.

    The PAR_ attributes are not relevant to Tables. Do not enter any values for them.

  • PI_INSTCLASSIFICATIONCOLL (Mandatory) Enter NULL because you are creating a Table definition.

Create a Table Instance

Use this API to create a Table Instance.

Name

CDR_PUB_DF_TABLE.CreateTableInstance

Signature

PROCEDURE CREATETABLEINSTANCE( 
  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, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_NAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE, 
  PIO_TABLE_INSTANCE  IN OUT    CDR_TABLE_REF_OBJ_TYPE, 
  PI_CREATETYPE  IN    VARCHAR2, 
  PI_INSTANCESUBTYPEID  IN    NUMBER, 
  PI_DEFCLASSIFICATIONCOLL  IN    CDR_CLASSIFICATIONS_COLL, 
  PI_INSTCLASSIFICATIONCOLL  IN    CDR_CLASSIFICATIONS_COLL 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_NAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes. For OBJECT_TYPE_RC enter $OBJTYPES$TABLEREF.
  • PIO_TABLE_INSTANCE (Optional) This is a parameter of table type CDR_TABLE_OBJ_TYPE that contains object attributes specific to Table instances.

    The following attributes are required: COMPANY_ID,OBJ_ID,OBJ_VER,ORACLE_NAME,SAS_NAME SASV6FLAGRC = '$YESNO$NO', SNAPSHOTFLAGRC= $YESNO$YES', BLINDINGFLAGRC= '$YESNO$YES',PROCESSTYPERC = '$PROCESSTYPES$STAGINGWAUDIT',BLINDINGSTATUSRC= '$BLIND_STATS$BLINDED',COMPRESSFLAGRC= '$YESNO$NO',GENERATIONSTATUSRC= '$YESNO$NO'.

  • PI_CREATETYPE (Mandatory) Enter INST to create a Table instance of an existing Table definition. Enter BOTH to create a Table definition and a Table instance of it.
  • PI_INSTANCESUBTYPEID (Mandatory) Enter the SUBTYPE_ID of the Table instance.
  • PI_DEFCLASSIFICATIONCOLL (Optional) By default the new definition is classified according to the subtype you assigned it in the CDR_NAMING_VERSION_OBJ_TYPE.

    If you want to override the default classifications for one or more classification levels, use this parameter. This is a collection of CDR_CLA_OBJ_TYPEs, which have 5 attributes, including CLA_LEVEL_ID and CLASSIFICATION_ID.

    If you want the definition to inherit its classifications for a particular level from its parent, enter the classification level ID and, for the CLASSIFICATION_ID, enter 0 (zero).

    If you want to explicitly assign one or more terms for a particular level, initialize a CDR_CLA_OBJ_TYPE for each term, entering the classification level ID and, for the CLASSIFICATION_ID, the term ID. The PAR_ attributes are not relevant to Tables. Do not enter any values for them. If you are not creating a new definition, do not enter values here.

  • PI_INSTCLASSIFICATIONCOLL (Optional) By default the new instance is classified according to the subtype you assigned it in the PI_INSTANCE_SUBTYPE_ID.

    If you want to override the default classifications for one or more classification levels, use this parameter. This is a collection of CDR_CLA_OBJ_TYPEs, which have 5 attributes, including CLA_LEVEL_ID and CLASSIFICATION_ID.

    If you want the instance to inherit its classifications for a particular level from its parent Work Area, enter the classification level ID and, for the CLASSIFICATION_ID, enter 0 (zero).

    If you want to explicitly assign one or more terms for a particular level, initialize a CDR_CLA_OBJ_TYPE for each term, entering the classification level ID and, for the CLASSIFICATION_ID, the term ID.

    The PAR_ attributes are not relevant to Tables. Do not enter any values for them. If you are not creating a new instance, do not enter values here.

Create a Temporary Blob

Use this API to create a temporary BLOB in a BLOB Table. Call this API before you upload Columns or Table Descriptors using the UPLOADOPERATORCOLUMNS API for a SAS or CPORT file, or before creating a Table for a SAS dataset.

Name

CDR_PUB_DF_TABLE.CreateTempBlob

Signature

PROCEDURE CREATETEMPBLOB( 
  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, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_TMPBLOBOBJ  IN OUT    CDR_TEMP_BLOBS_OBJ_TYPE 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PIO_TMPBLOBOBJ (Mandatory) This is parameter of table type CDR_TEMP_BLOBS_OBJ_TYPE that contains information about the BLOB.

The required attributes are: FILE_NAME, FILE_BLOB

Create a Table Column

Use this API to create a Table Column. As with any other object, you can create an instance of an existing Variable or create a new Variable and Column. (Variable is the definition object for Columns.)

Name

CDR_PUB_DF_TABLE.CreateColumn

Signature

PROCEDURE CREATECOLUMN( 
  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, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_NAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE, 
  PIO_VARIABLE  IN OUT    CDR_VAR_OBJ_TYPE, 
  PIO_COLUMN  IN OUT    CDR_COLUMNS_OBJ_TYPE, 
  PI_CREATETYPE  IN    VARCHAR2, 
  PI_DEFCLASSIFICATIONCOLL  IN    CDR_CLASSIFICATIONS_COLL 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_NAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes. For OBJECT_TYPE_RC enter $OBJTYPES$COLUMN.
  • PIO_VARIABLE (Mandatory) This is a parameter of table type CDR_VAR_OBJ_TYPE that contains object attributes specific to Variables.

    The following attributes are required: ORACLE_NAME, ORACLE_DATATYPE_RC, LENGTH, PRECISION, SAS_V8_NAME, SAS_LABEL, SAS_FORMAT, NULLABLE_FLAG_RC, DEFAULT_VALUE.

  • PIO_COLUMN (Mandatory) This is a parameter of table type CDR_COLUMNS_OBJ_TYPE that contains object attributes specific to Columns.

    The following attributes are required: COMPANY_ID, OBJ_ID, OBJ_VER, POSITION, SAS_LABEL, NULLABLE_FLAG_RC.

  • PI_CREATETYPE (Mandatory) Enter INST to create only a Column of an existing definition (Variable); or BOTH to create a new Column and Variable.
  • PI_DEFCLASSIFICATIONCOLL (Optional) By default the new definition is classified according to the subtype assigned it in the CDR_NAMING_VERSION_OBJ_TYPE.

    If you want to override the default classifications for one or more classification levels, use this parameter. This is a collection of CDR_CLA_OBJ_TYPEs, which have 5 attributes, including CLA_LEVEL_ID and CLASSIFICATION_ID.

    If you want the definition to inherit its classifications for a particular level from its parent, enter the classification level ID and, for the CLASSIFICATION_ID, enter 0 (zero).

    If you want to explicitly assign one or more terms for a particular level, initialize a CDR_CLA_OBJ_TYPE for each term, entering the classification level ID and, for the CLASSIFICATION_ID, the term ID. The PAR_ attributes are not relevant to Columns. Do not enter any values for them.

    If you are not creating a new definition, do not enter values here.

Modify a Table Column

Use this API to modify a column in a Table definition.

Name

CDR_PUB_DF_TABLE.ModifyColumn

Signature

PROCEDURE modifyColumn(
p_api_version IN NUMBER
,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
, pio_naming IN OUT NOCOPY cdr_naming_version_obj_type
, pio_column IN OUT NOCOPY cdr_columns_obj_type
) ;

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_NAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSIONS_OBJ_TYPE that contains object attributes. Enter values you want to change. For OBJECT_TYPE_RC enter $OBJTYPES$COLUMN.
  • PIO_COLUMN (Mandatory) This is a parameter of table type CDR_COLUMNS_OBJ_TYPE that contains object attributes specific to Columns. You can change the Column's name, description and values for the NULLABLEFLAGRC, and SAS_LABEL attributes. Valid values for NULLABLEFLAGRC are $YESNO$YES or $YESNO$NO.

Create a Table Constraint

Use this API to create a constraint for a Table definition or a Table instance.

Name

CDR_PUB_DF_TABLE.CreateTableConstraint

Signature

PROCEDURE CREATETABLECONSTRAINT( 
  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, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_NAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE, 
  PIO_CONSTRAINT  IN OUT    CDR_TABLE_CONS_OBJ_TYPE, 
  PI_CONSTRAINTCOLUMNS  IN OUT    CDR_TABLE_CONCOLS_LIST_COLL, 
  PI_VALS  IN    CDR_VALS_COLL 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_NAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes. Enter $OBJTYPES$TABLECNSTR for OBJECT_TYPE_RC.
  • PIO_CONSTRAINT (Mandatory) This is a parameter of table type CDR_TABLE_CONS_OBJ_TYPE. You must enter values for CONSTRAINT_TYPE_RC.

    The possible values are: $CONSTRAINTYPES$CHECK, $CONSTRAINTYPES$NUINDEX, $CONSTRAINTYPES$PRIMARYKEY, and $CONSTRAINTYPES$UNIQUE.

  • PI_CONSTRAINTCOLUMNS (Mandatory) This is a collection of table type CDR_TABLE_CONCOLS_OBJ_TYPE. Identify the Table and the Table's columns where you want to apply the Constraints. Depending on the Constraint, you must also provide values for attributes that define Foreign Key, or that identify the List of Values object to store the values for a CHECK Constraint.

    The following attributes are required: TABC_COMPANY_ID,TABC_OBJ_ID,TABC_OBJ_VER,FK_COL_COMPANY_ID,FK_COL_OBJ_ID,FK_COL_OBJ_VER,POSITION,COL_COMPANY_ID,COL_OBJ_ID,COL_OBJ_VER,LOV_COMPANY_ID,LOV_ID,LOV_VER

  • PI_VALS (Optional) This is a collection of CDR_VAL_OBJ_TYPE that contains the values for a CHECK Constraint.

Modify a Table Constraint

Use this API to modify a Table constraint. You need to check out the Table definition to modify the constraint.

PROCEDURE modifyTableConstraint(
p_api_version IN NUMBER
,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
, pio_naming IN OUT NOCOPY cdr_naming_version_obj_type
, pio_constraint IN OUT NOCOPY cdr_table_cons_obj_type
, pi_constraintColumns IN cdr_table_concols_list_coll
, pi_vals IN cdr_vals_coll
) ;

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_NAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes. Enter values to identify the Table Constraint and enter new values for the attributes you want to modify. Enter $OBJTYPES$TABLECNSTR for OBJECT_TYPE_RC.
  • PIO_CONSTRAINT (Mandatory) This is a parameter of table type CDR_TABLE_CONS_OBJ_TYPE. Enter values you want to change. You can change the name, description, and values specific to the constraint type; for example, values for the CHECK constraint. You cannot modify the constraint type.
  • PI_CONSTRAINTCOLUMNS (Mandatory) This is a collection of table type CDR_TABLE_CONCOLS_OBJ_TYPE. Identify the table and the table's columns where you want to apply the constraints.
  • PI_VALS (Optional) This is a collection of CDR_VAL_OBJ_TYPE that contains the values for a CHECK constraint. It is not relevant to other constraints.

Modify a Table Definition

Use this API to modify a Table definition. You need to check out the Table definition that you want to modify.

Name

CDR_PUB_DF_TABLE.ModifyTableDefinition

Signature

PROCEDURE MODIFYTABLEDEFINITION( 
  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, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_NAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE, 
  PIO_TABLE  IN OUT    CDR_TABLE_OBJ_TYPE 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_NAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSION_OBJ_TYPE. Enter values to identify the Table definition and enter new values for the attributes you want to modify. All attributes are required.

    Note:

    Use separate APIs for modifying the validation status and the version label: CDR_PUB_VL_VALIDATION. UPDATE VAL STATUS and CDR_PUB_DF_NAMING.UPDATEVERSIONLABEL.
  • PIO_TABLE (Mandatory) This is a parameter of table type CDR_TABLE_OBJ_TYPE that contains attributes specific to Table definitions. Enter the values that you want to change.

Create a Table Descriptor

Use this API to create a Table Descriptor. Table Descriptors are owned by executable object definitions and Business Area definitions and are required to map to source and target Table instances. You must check out the parent object to create a Table Descriptor.

Name

CDR_PUB_DF_TABLE.CreateTableDescriptor

Signature

p_api_version IN NUMBER
,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
, pio_naming IN OUT NOCOPY cdr_naming_version_obj_type
, pio_table_descriptor IN OUT NOCOPY cdr_table_desc_obj_type
, pi_createType IN VARCHAR2
, pi_instanceSubTypeId IN NUMBER
, pi_defClassificationColl IN CDR_CLASSIFICATIONS_COLL
, pi_InstClassificationColl IN CDR_CLASSIFICATIONS_COLL
) ;

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_NAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSION_OBJ_TYPE. Enter values to identify the Table Descriptor and enter new values for the attributes you want to create. All attributes are required. See CDR Naming Version Object Type. For OBJECT_TYPE_RC enter $OBJTYPES$TABLEDESCRIPTOR.

    If you are creating a Table Descriptor from an existing Table definition, enter values for the table definition in the CDR naming attributes. REF_COMPANY_ID, REF_OBJ_ID, REF_OBJ_VER.

    If you are creating a new Table definition, leave these attributes blank.

  • PIO_TABLE_DESCRIPTOR (Mandatory) This is a parameter of table type CDR_TABLE_OBJ_TYPE that contains attributes specific to Table Descriptors, including:
    • LIBREF: Enter Target or Source.
    • TARGET_OPER_FLAG_RC: Enter $YESNO$YES
    • TARGET_AS_DATASET_FLAG_RC: Enter $YESNO$NO
    • PROCESS_TYPE_RC: Enter $PROCESSTYPES$STAGINGWAUDIT
    • REVEAL_AUDIT_FLAG_RC: Enter $PROCESSTYPES$STAGINGWAUDIT
    • SEQ: Enter 1.
  • PI_CREATETYPE (Mandatory)
    • Enter INST to create a Table instance of an existing Table definition.
    • Enter BOTH to create a Table definition and a Table instance of it.
  • PI_INSTANCESUBTYPEID (Mandatory) Enter NULL.
  • PI_DEFCLASSIFICATIONCOLL (Optional) To inherit its classifications for a particular level from its parent, enter the classification level ID and, for the CLASSIFICATION_ID, enter 0 (zero). The PAR_ attributes are not relevant. Do not enter any values for them.

    Or enter NULL.

  • PI_INSTCLASSIFICATIONCOLL (Mandatory) Enter NULL because you are creating a Table definition.

Modify a Table Descriptor

Use this API to modify a Table Descriptor. You need to check out the parent object of the Table Descriptor in order to modify it.

Name

CDR_PUB_DF_TABLE.ModifyTableDescriptor

Signature

PROCEDURE MODIFYTABLEDESCRIPTOR( 
  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, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_NAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE, 
  PIO_TABLE_DESCRIPTOR  IN OUT    CDR_TABLE_DESC_OBJ_TYPE 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_NAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSION_OBJ_TYPE. Enter values to identify the Table Descriptor and enter new values for the attributes you want to modify. All attributes are required.

    Note:

    Use separate APIs for modifying the validation status and the version label: CDR_PUB_VL_VALIDATION. UPDATE VAL STATUS and CDR_PUB_DF_NAMING.UPDATEVERSIONLABEL.
  • PIO_TABLE_DESCRIPTOR (Mandatory) This is a parameter of table type CDR_TABLE_OBJ_TYPE that contains attributes specific to Table Descriptors. Enter the values that you want to change.

Modify a Table Instance

Use this API to modify a Table Instance.

Name

CDR_PUB_DF_TABLE.ModifyTableInstance

Signature

PROCEDURE MODIFYTABLEINSTANCE( 
  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, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_NAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE, 
  PIO_TABLE_INSTANCE  IN OUT    CDR_TABLE_REF_OBJ_TYPE 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_NAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSION_OBJ_TYPE. Enter values to identify the Table instance and enter new values for the attributes you want to modify. All attributes are required.

    Note:

    Use separate APIs for modifying the validation status and the version label: CDR_PUB_VL_VALIDATION. UPDATE VAL STATUS and CDR_PUB_DF_NAMING.UPDATEVERSIONLABEL.
  • PIO_TABLE_INSTANCE (Mandatory) This is a parameter of table type CDR_TABLE_OBJ_TYPE that contains attributes specific to Table instances. Enter the values that you want to change.

Reorder a Column

Use this API to reorder a Table's columns. You need to check out the Table definition whose columns you want to reorder.

Name

CDR_PUB_DF_TABLE.ReorderColumns

Signature

PROCEDURE REORDERCOLUMNS( 
  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, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PI_REORDEROBJCOLL  IN    CDR_REORDER_OBJ_COLL 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

PI_REORDEROBJCOLL (Mandatory) This is a collection of CDR_REORDER_OBJ_TYPE that contains the Column objects that you want to reorder. The value for ENTRY_NUMBER must be NULL. Add the Columns to the collection in the new order in which you want them.

Upload a Table Descriptor or Column

Use this API to upload Columns and/or a Table Descriptor.

Name

CDR_PUB_DF_TABLE.UploadOperatorColumns

Signature

PROCEDURE UPLOADOPERATORCOLUMNS( 
  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, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PI_COMPID  IN    NUMBER, 
  PI_NSOBJID  IN    NUMBER, 
  PI_NSOBJVER  IN    NUMBER, 
  PI_OBJID  IN    NUMBER, 
  PI_OBJVER  IN    NUMBER, 
  PI_NVCOLL  IN    CDR_NAME_VALUE_PAIR_COLL 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PI_COMPID (Mandatory) Enter the COMPANY_ID of the Column or Table Descriptor.
  • PI_NSOBJID (Mandatory) Enter the Namespace OBJ_ID of the Column or Table Descriptor.
  • PI_NSOBJVER (Mandatory) Enter the Namespace OBJ_VER of the Column or Table Descriptor.
  • PI_OBJID (Mandatory) Enter the OBJ_ID of the Column or Table Descriptor.
  • PI_OBJVER (Mandatory) Enter the OBJ_VER of the Column or Table Descriptor.
  • PI_NVCOLL (Mandatory) This is a collection of CDR_NAME_VALUE_PAIR_OBJ_TYPE that contains name value pairs for the variable in LSH database to store the uploaded Columns and/or Table Descriptor.

    You must call CREATETEMPBLOB API before you use this API.

    For SAS/C-PORT files, the variable name is the TMP_BLOB_ID which is defined after you call CREATETEMPBLOB API. For other uploads, the variable name is NULL.

Check Out a Table

Use this API to check out a Table definition or definition and instance.

Name

CDR_PUB_DF_TABLE.Checkout

Signature

Procedure checkout(
p_api_version IN NUMBER
,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
, pio_baseObject IN OUT NOCOPY cdr_base_obj_type
, pi_comment IN VARCHAR2
, pi_isInstOnly IN VARCHAR2
) ;

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_BASEOBJECT (Mandatory) This is a parameter of table type CDR_BASE_OBJ_TYPE. You can enter values to identify either the Table definition or an instance of it:
    • Pass the Table definition details if you want to check out and subsequently modify only the definition.
    • Pass the details of an instance of the Table definition if you want the instance to point to the new version of the Table definition.

    The following attributes are required: COMPANY_ID, OBJ_ID, OBJ_VER, OBJECT_VERSION_NUMBER, NAMESPACE_OBJ_ID, NAMESPACE_OBJ_VER.

    NAMESPACE_OBJ_ID. If you are entering information about a Table definition, enter the object ID of its containing Application Area. If you are entering information about a Table instance, enter the object ID of its containing Work Area.

    NAMESPACE_OBJ_VER. If you are entering information about a Table definition, enter the object version number of its containing Application Area. If you are entering information about a Table instance, enter the object version number of its containing Work Area.

  • PI_COMMENT (Optional) Enter the reason you are checking out the Table.
  • PI_ISINSTONLYEnter $YESNO$NO if you are checking out only the definition. Enter $YESNO$YES if you are checking out the definition through its instance.

Check In a Table

Use this API to check in a Table Object.

Name

CDR_PUB_DF_TABLE.CheckIn

Signature

PROCEDURE CHECKIN( 
  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, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_BASEOBJECT  IN OUT    CDR_BASE_OBJ_TYPE, 
  PI_COMMENT  IN    VARCHAR2 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_BASEOBJECT (Mandatory) This is a parameter of table type CDR_BASE_OBJ_TYPE. Enter values to identify the Table definition that you want to check in.

    The following attributes are required: COMPANY_ID,OBJ_ID,OBJ_VER,OBJECT_VERSION_NUMBER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.

  • PI_COMMENT (Optional) Enter the reason you are checking in the Table.

Undo Check Out for a Table Definition

Use this API to undo a check out for a Table Definition.

Name

CDR_PUB_DF_TABLE.UndoCheckOut

Signature

PROCEDURE UNDOCHECKOUT( 
  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, 
  X_RETURN_STATUS  OUT  NOCOPY  VARCHAR2, 
  x_MSG_COUNT OUT NOCOPY NUMBER, 
  X_MSG_DATA  OUT  NOCOPY  VARCHAR2, 
  PIO_BASEOBJECT  IN OUT  NOCOPY  CDR_BASE_OBJ_TYPE, 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

  • PIO_BASEOBJECT (Mandatory) This is a parameter of table type CDR_BASE_OBJ_TYPE that contains object attributes. Enter values to identify the Table definition that you want to undo check out.

    The required attributes are: COMPANY_ID, OBJ_ID, OBJ_VER, OBJECT_VERSION_NUMBER,NAMESPACE_OBJ_ID, NAMESPACE_OBJ_VER.

Remove a Single Object

Use this API to remove a single object of any of the following types: Table definition, Table instance, Table Descriptor, Column, or a Constraint.

Name

CDR_PUB_DF_TABLE.Remove

Signature

PROCEDURE REMOVE( 
  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, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PI_NAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_NAMING (Mandatory) This is a collection of CDR_BASE_OBJ_TYPEs. For each object that you want to remove, initialize a CDR_BASE_OBJ_TYPE and then extend the collection.

The following attributes are required: COMPANY_ID,OBJ_ID,OBJ_VER,OBJECT_VERSION_NUMBER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.