You are on page 1of 29

HCM

Data Loader (HDL)


Keys

Prasanna Borse
Oracle HCM Cloud Center of Excellence
June, 2017

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 2


Agenda
• Keys - Overview
– What are Keys?
– Supported Key Types
– Key Resolution Sequence
• Supplying Keys
– New Objects\Create
– Existing Objects\Update
• System Integration Considerations
• Rel12: SourceKey.dat

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 3
Overview
•Keys
-What are they?
-Supported Key Types
-Key Resolution Sequence

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 4
Keys
What are they?

• Keys uniquely identify:


– The local business object component - Local Key(s)
– The parent of a business object component – Parent Key(s)
– Any other object referenced by a business object component – Foreign Key(s)

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 5


Integration-Enabled Object Keys

• Traditional Key Types


– Oracle Fusion Surrogate ID
– User Keys

• Integration Key Types


– Oracle Fusion GUID
– Source Keys

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 6


HCM Data Loader Supported Keys
Four Keys Types Supported

• Oracle Fusion GUID


• Source Keys
• Oracle Fusion Surrogate ID
• User Keys

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 7


HCM Data Loader Supported Keys

Business Object Fusion GUID Source Key Surrage ID User Key


Location 25DD4078E961A23BE053A697480AFB92 STUDENT1_LOC1 300000001572671 (Set code and Location Code) COMMON, HQ1
HRC_INTEGRATION_KEY_MAP HRC_INTEGRATION_KEY_MAP Base table BO Documentation \ UI

SQLs:
Fusion GUID: select OBJECT_NAME, SOURCE_SYSTEM_ID, SOURCE_SYSTEM_OWNER, SURROGATE_ID, RAWTOHEX(GUID) guid from fusion.HRC_INTEGRATION_KEY_MAP WHERE
SOURCE_SYSTEM_OWNER ='STUDENT1‘

Source Key: Same as above or just refer to the source system like PS or EBS for source system owner and ID information.

Surrogate ID: select * from PER_LOCATION_DETAILS_F_VL where location_code = 'STUDENT1 Location1‘ (Result Location ID = 300000001572671)

User Key:- Best way to get this info is the Business Object Documentation from MOS. Other option is UI as shown below

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 8


Oracle Fusion GUID
Integration Key Generated by Fusion

• Generated in Oracle Fusion when a record is created


• Hexadecimal value
• Unique across all objects
• Held in Integration Key Map

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 9


Oracle Fusion Surrogate ID
Fusion Generated Unique ID

• Generated in Oracle Fusion when the record is created


• Numeric value
• Unique only for the object type
• Held against the object definition

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 10


Source Keys
Source System Key Information

• Two values combined:


– SourceSystemOwner
– SourceSystemID
• Held in Integration Key Map

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 11


User Keys
User Readable and Generated Keys

• Natural values
• One or many attributes
• Sometimes alternatives
• Sometimes updateable

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 12


Key Resolution Sequence

1. Oracle Fusion GUID


2. Oracle Fusion Surrogate ID
3. Source Keys
4. User Key

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 13


Summary

Key Type Create Update Held on Object Type Generated Automatically


GUID No Yes No Hexadecimal Yes

Surrogate ID No Yes (see note) Yes Numeric Yes

Source Key Yes Yes No Alphanumeric Conditionally (see note)

User Key Yes Yes (see note) Yes Alphanumeric No

•You can use surrogate IDs when updating objects, but the IDs may not be readily available to
Oracle HCM Cloud users.
•Default source keys are generated only if you don't supply a source key when creating an
object.
•You can't use user keys alone when updating some objects because their values are subject
to change.
•Keys that aren't held on the object exist in the Integration Key Map table.

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 14


Supplying Keys
- New Objects\Create
- Existing Objects\Update

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 15
Supported Key Types

• New Objects
– Source Keys
– User Keys

• Existing Objects
– Source Keys
– User Keys
– Fusion GUID
– Fusion Surrogate ID

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 16


Using Keys when Creating Objects

Creating an Object Using Source Keys:


METADATA|Job|JobCode|EffectiveStartDate|EffectiveEndDate|Name|SetCode|Source
SystemOwner|SourceSystemId
MERGE|Job|SE|2010/01/01|4712/12/31|Software Engineer|COMMON|EBS-UK|12349

Creating an Object Using a User Key:


METADATA|Job|JobCode|EffectiveStartDate|EffectiveEndDate|Name|SetCode
MERGE|Job|SE|2010/01/01|4712/12/31|Software Engineer|COMMON

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 17


Using Keys when Updating Objects
Source Keys and User Keys

Updating an Object Using Source Keys:


METADATA|Job|EffectiveStartDate|EffectiveEndDate|Name|SourceSystemOwner|Sour
ceSystemId
MERGE|Job|2010/01/01|4712/12/31|Software Engineer - Java|EBS-UK|12349

Updating an Object Using a User Key:


METADATA|Job|JobCode|EffectiveStartDate|EffectiveEndDate|Name|SetCode
MERGE|Job|SE|2010/01/01|4712/12/31|Software Engineer - Java|COMMON

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 18


Using Keys when Updating Objects
Fusion IDs

Updating an Object Using the Fusion GUID:


METADATA|Job|GUID|EffectiveStartDate|EffectiveEndDate|Name
MERGE|Job|2342UJHFI2323|2010/01/01|4712/12/31|Software Engineer - Java

Updating an Object Using the Fusion Surrogate ID:


METADATA|Job|JobId|EffectiveStartDate|EffectiveEndDate|Name
MERGE|Job|13413|2010/01/01|4712/12/31|Software Engineer - Java

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 19


Referencing Foreign Objects

• Supply Foreign Keys to Reference:


– The parent of the record
– Any foreign object referenced by the record

• Key Types Supported:


– All four key types if referencing an integration enabled object
– Only User Keys and Surrogate ID for non-integration enabled Fusion HCM objects
– Only User Keys for non HCM objects

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 20


Specifying Foreign Keys

Using the Fusion Surrogate ID as a Foreign Key:


METADATA|Assignment|JobId|EffectiveStartDate|EffectiveEndDate|AssignmentNumb
er|SourceSystemId|SourceSystemOwner
MERGE|Assignment|13413|2010/01/01|4712/12/31|5232|EBS-UK|234234

Using the User Key as a Foreign Key:


METADATA|Assignment|JobCode|SetCode|EffectiveStartDate|EffectiveEndDate|Assi
gnmentNumber|SourceSystemId|SourceSystemOwner
MERGE|Assignment|SE|COMMON|2010/01/01|4712/12/31|5232|EBS-UK|234234

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 21


Specifying Foreign Keys - Hints
Integration Key Types are Supplied Using Hints

Using the Fusion GUID as a Foreign Key:


METADATA|Assignment|JobId(GUID)|EffectiveStartDate|EffectiveEndDate|Assignme
ntNumber|SourceSystemId|SourceSystemOwner
MERGE|Assignment|2342UJHFI2323|2010/01/01|4712/12/31|5232|EBS-UK|234234

Using the Source Key as a Foreign Key:


METADATA|Assignment|JobId(SourceSystemId)|EffectiveStartDate|EffectiveEndDat
e|AssignmentNumber|SourceSystemId|SourceSystemOwner
MERGE|Assignment|13143|2010/01/01|4712/12/31|5232|EBS-UK|234234

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 22


Supplying Key Attributes Example
Using All Key Types

METADATA|Assignment|JobCode|SetCode|GradeId(GUID)|OrganizationId|LocationId(
SourceSystemId)|EffectiveStartDate|EffectiveEndDate|AssignmentNumber|SourceS
ystemOwner|SourceSystemId
MERGE|Assignment|SE|COMMON|SFUIO2NELKFSPO30|134|234|2013/01/01|4712/12/31|23
42342-1|EBS-UK|234234

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 23


System Integration Considerations

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 24
System Integration Considerations
Coexistence\other Integrations

• What not to do?


– Include effective date or hire date as part of the unique key\source key
– Include first name or last name as part of unique key\source key for person name
• Bottom line: Please do not design keys which can be easily changed in the
source application.

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 25


Release12: SourceKey.dat

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 26
SourceKey.dat
Updating Source Key

• When you load data using HCM Data Loader, you can provide a source key.
The source key is a value, usually generated from a legacy environment,
that identifies the record uniquely in that environment.
• If you specify no source key, then a default source key is generated. You
can update both default and locally defined source keys for integration-
enabled objects. This topic describes how to update source keys.

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 27


SourceKey.dat
Updating Source Key

• To update the source key associated with any record, you load a
SourceKey.dat file. In the file, you supply both a reference to the record to
update and the new source-key value.

SourceKey.dat
METADATA SourceKey BusinessObject Component OldSourceSystemOwner OldSourceSystemId NewSourceSystemOwner NewSourceSystemId
MERGE SourceKey Worker PersonPhone FUSION 300000001572671 PEOPLESOFT PH1001_W
MERGE SourceKey Worker PersonAddress FUSION 300000002451147 PEOPLESOFT ADDR1001_HOME

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 28

You might also like