The MERGE Instruction

The MERGE instruction identifies a data line. You use the MERGE instruction whether creating or updating objects, and HCM Data Loader identifies the correct action.

You can supply either partial or complete objects using the MERGE instruction. The data supplied on the MERGE line is merged into existing Oracle HCM Cloud data. The order in which you specify MERGE lines isn't necessarily the order in which HCM Data Loader processes them.

Instruction Format

The MERGE line has this format:

MERGE|<DISCRIMINATOR>|<ATTRIBUTE 1>|<ATTRIBUTE 2>|<ATTRIBUTE n>

For example:

MERGE|Job|SE|Software Engineer|Common|2015/01/01|4712/12/31

Restrictions

These restrictions apply to the MERGE line:

  • You must not supply multiple MERGE lines for the same component in a single data file, unless the object is date-effective. For example, you can't supply two MERGE lines, one to create a Person Ethnicity component and one to update it, in the same data file. As the component isn't date-effective, these instructions would correct the data rather than update it. In such cases, you can supply only current data. Alternatively, you can create the record in one data file and update it in a different data file.

    Note: HCM Data Loader doesn't process individual file lines, but groups related lines. This grouping works for date-effective records because the file lines are processed in order of effective start date.
  • You can include MERGE and DELETE instructions in the same file, but not for the same logical record. For example, you can't load multiple date-effective records for the same component, such as a single Job, using a mix of MERGE and DELETE instructions. However, you can provide both MERGE and DELETE instructions for components of a single logical object. For example, you can provide:

    • MERGE instructions for Worker and Person Name

    • DELETE instructions for the Person Email and Person Phone components of the same Worker object

Validation

Each MERGE line must:

  • Be preceded by the METADATA line for the same discriminator.

  • Contain the same attributes as the relevant METADATA line and in the same order.

  • Not include values for attributes that aren't in the METADATA line.

  • Contain a unique identifier for itself, using any of the supported key types. In addition, each data line for a child component must include a unique reference to its parent. For example, GradeRateValue must include a unique reference to its associated GradeRate.