Introduction
You can use HCM Data Loader (HDL) to bulk-load data into your descriptive and extensible flexfield segments and to upload attachments and images for those HDL objects that support it.
Note:
It's expected that you understand how to create and upload files using HCM Data Loader. If you're new to HDL, you should complete the tutorials listed in the Prerequisites section first.Objectives
In this tutorial you will:
- Understand how to supply data for descriptive flexfield segments.
- Load data into extensible flexfield segments.
- Understand how to supply images and attachments.
- Load person images using the Worker object.
Prerequisites
To complete this tutorial, you will require:
- Access to import and load data using HCM Data Loader.
Tip:
Refer to the Configure Access to HCM Data Loader (HDL) and Understand HDL Security Options tutorial for the steps to create HDL access and to understand the security options. - A text editor to create your files.
- A file compressor to zip your business object data files.
It's recommended that you complete these tutorials before attempting this tutorial:
- Create and Maintain Data with HCM Data Loader (HDL)
- Create and Load New Hires with HCM Data Loader (HDL)
Note:
The task to upload person images extends the new hires created by this tutorial.Task 1: Finding Flexfield Attribute Names
In this step, you will learn how to find the HDL attribute names for the flexfield segments you have configured. It assumes flexfield configuration is complete and changes have been deployed.
- Log into the application with a user with HCM Data Loader access.
- Navigate to Data Exchange > View Business Objects.
- Use the Query by Example fields to search for the Job Business Object.
- Select the business object and click Refresh Object.
- Click Submit on the Schedule Request page.
- Click View Process Results in the page header.
- Refresh the table until the process to refresh your object has completed, then return to the View Business Objects page.
- Click on the Job Business Object name to navigate to the Business Object Details page.
- You'll see the object hierarchy on the left, click the component in the hierarchy that you want to find the flexfield attribute information for.
- Click on the Flexfield Attributes tab.
- Change the Context to the context you want to find the attributes for and click Search.
- The list of attribute names to use in your HCM Data Loader file are displayed:
Tip:
You only need to refresh an object when you've configured new flexfield segments. This process updates the list of available attributes for the object.Task 2: Loading Flexfield Data
In this step, you will learn how to supply METADATA and MERGE lines to upload data to flexfield segments.
Flexfield Context
When loading flexfield segments, HDL needs to understand the context of the flexfield data being loaded. You can only load data for one context on a MERGE line, though for descriptive flexfields, global segments can be populated along with context specific segments.
- For both descriptive and extensible flexfields the context is defined using the attribute:
- When supplying flexfield segments the attribute name includes a hint which names the flexfield code and context:
FLEX:{flexfield code}
Examples: FLEX:PER_JOBS_DFF and FLEX:PER_JOBS_LEG_EFF
{flexfield attribute name}({flexfield code}={context code})
For example, clearanceLevel(PER_JOBS_DFF=US_JOB_REQ). This format tells HDL that the clearance level segment belongs to the PER_JOBS_DFF flexfield within the US_JOB_REQ context.
Loading Descriptive Flexfield Segments
Descriptive flexfields extend a business-object component. You supply the attributes of the descriptive flexfield on the same MERGE line as the core attributes of the business-object component. On the METADATA line, you must include both the flexfield code and the descriptive flexfield attributes for which you want to load data.
As descriptive flexfield segments aren’t preconfigured, it isn’t possible to provide an example you can upload. Use these steps to understand how to load descriptive flexfield data, but the attribute names and values will need to be replaced with data relevant to your configuration.
- Create a new file and supply a METADATA line defining the core attributes, along with the descriptive flexfield attributes you want to include data for. For example:
- Add MERGE lines to your file to specify the core attribute values, flexfield context and flexfield segment values, such as:
METADATA|Job|SourceSystemOwner|SourceSystemId|EffectiveStartDate|SetCode|JobCode|Name|FLEX:PER_JOBS_DFF|clearanceLevel(PER_JOBS_DFF=US_JOB_REQ)
MERGE|Job|VISION|SMGR|2000/01/01|COMMON|SNR_MGR|Senior Manager|US_JOB_REQ|HIGH
This will load a value of HIGH to the Clearance Level descriptive flexfield segment that exists within the US_JOB_REQ flexfield context.
Loading Extensible Flexfield Segments
In addition to a flexfield code and context, extensible flexfields also have a category code, which must be supplied to the EFF_CATEGORY_CODE attribute.
- Create a new file and add the following METADATA line:
- Add the following MERGE line to your file:
- Save your file, naming it Job.dat.
- Compress (zip) your Job.dat file into a filename of your choice.
- Import and load your job flexfield data using the Import and Load Data task.
METADATA|JobLegislative|SourceSystemOwner|SourceSystemId|JobId(SourceSystemId)|EffectiveStartDate|LegislationCode|InformationCategory|FLEX:PER_JOBS_LEG_EFF|EFF_CATEGORY_CODE|_EEO1_CATEGORY(PER_JOBS_LEG_EFF=HRX_US_JOBS)|_FLSA_STATUS(PER_JOBS_LEG_EFF=HRX_US_JOBS)
MERGE|JobLegislative|VISION|MGR_JOB_LEG|MGR|2000/01/01|US|HRX_US_JOBS|HRX_US_JOBS|JOB_LEG|PROFESSIONAL|NONEXEMPT
This table explains the flexfield attributes supplied in this file:
Attribute Name | Value | Description |
---|---|---|
FLEX:PER_JOBS_LEG_EFF | HRX_US_JOBS | The context code of the flexfield. |
EFF_CATEGORY_CODE | JOB_LEG | The flexfield category code. |
_EEO1_CATEGORY(PER_JOBS_LEG_EFF=HRX_US_JOBS) | PROFESSIONAL | The EEO1 Category segment on the HRX_US_JOBS context of the PER_JOBS_LEG_EFF flexfield. |
_FLSA_STATUS(PER_JOBS_LEG_EFF=HRX_US_JOBS) | NONEXEMPT | The FLSA Status segment on the HRX_US_JOBS context of the PER_JOBS_LEG_EFF flexfield. |
Tip:
These flexfield segments are lookup validated. The lookup code is supplied, but if you need to supply the meaning to a flexfield attribute, you append _Display to the attribute name, such as: _EEO1_CATEGORY_Display(PER_JOBS_LEG_EFF=HRX_US_JOBS)Task 3: Loading Images and Attachments
In this step, you will create a file to upload person images. Attachments are loaded in the same way.
You will extend the New Hire example created in the Create and Load New Hires with HCM Data Loader (HDL) tutorial.
- Create a new file and add the following:
- Each PersonImage record is identified by a source key. For example, EMP, HDL001_IMG.
- The parent record is identified using the PersonId attribute. As the source system ID is used to identify the parent record, the attribute has the (SourceSystemId) hint.
- The ImageName attribute is used to supply a name for the image.
- The Image attribute is used to specify the name of the file to be uploaded.
- Save your file, naming it Worker.dat.
- In the same directory as your Worker.dat file, create a sub-directory and name it BlobFiles.
- Add the files specified to the Image attribute within your Worker.dat file, to the BlobFiles directory. For example, chris_wells.png and lorraine_hugh.jpg.
- Compress (zip) your Worker.dat file along with your BlobFiles sub-directory, into a file name of your choice, or you can download and edit the Person Images.zip file.
- You can now upload your file with HCM Data Loader.
METADATA|PersonImage|SourceSystemOwner|SourceSystemId|PersonId(SourceSystemId)|ImageName|Image|PrimaryFlag MERGE|PersonImage|EMP|HDL001_IMG|HDL001|Chris Wells Profile|chris_wells.png|Y MERGE|PersonImage|EMP|HDL002_IMG|HDL002|Lorraine Hugh Profile|lorraine_hugh.jpg|Y
The PersonImage component is used to upload the employee's image.
Tip:
Although your file only has PersonImage records, it must still be named for the object hierarchy the PersonImage component belongs to.Tip:
Image and attachments files are loaded into attributes that have either a BLOB or CLOB data type. You must supply your image and attachment files in a directory named for the data type of the attribute being used. For example, BlobFiles or ClobFiles.Next Steps
The following tutorials will further expand your HCM Data Loader knowledge:
Related Links
The latest tutorials for HDL and HSDL are published in this topic on Cloud Customer Connect:
For further information, refer to these help topics:
Acknowledgements
- Authors - Ema Johnson (Senior Principal Product Manager)
More Learning Resources
Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.
For product documentation, visit Oracle Help Center.
Loading Flexfield Segments, Images and Attachments with HCM Data Loader (HDL)
F85026-03
September 2024