Overview
The Field Import Job automates the creation or update of module items by importing data either from XML, CSV or import files as items from a mapped folder. It is widely used in briefing and product systems to import large sets of items automatically.
There are two ways to perform an import:
Manually via the Import Settings in the module.
Automatically using the Field Import Job scheduler.
Regardless of the method, XML tags must be mapped to the corresponding module fields.
For scheduled imports, ensure the Run Import Scheduled checkbox is selected in Import Settings.
To handle differences in XML formats between systems, XML adjusters can be applied to preprocess the XML and make it compatible with the system (e.g., adjusting date formats). Additionally, action classes can perform post-import tasks, such as generating a new XML file with adjusted values. Both adjusters and action classes are configured in the module’s Import Settings.
Parameters
The table below provides an overview of parameters supported for the Field Import Job
Parameter | Description |
---|---|
| Name of the scheduler job. |
| Class that performs the import: |
| Module IDs for which the import will be evaluated. If unspecified, all active modules on the site are considered. |
| Site ID for which the import will be performed. |
| File system directory from which XML files will be picked up (use |
| Directory where successfully imported XML files are moved. |
| Interval in seconds at which the job is re-run. Default is 60 seconds. |
Note: Specified directories and folders must exist on the file system.
Example Configuration
The below is an example of the Field Import Job
joblist=fieldImport
job.fieldImport.type=dk.encode.ebms.scheduler.FieldImportJob
job.fieldImport.param.UserID=11536
job.fieldImport.param.moduleIds=101,102
job.fieldImport.param.SiteID=1
job.fieldImport.param.dropdir=../Files/ModuleRoot/{ModuleID}/Import
job.fieldImport.param.backupdir=../Files/ModuleRoot/{ModuleID}/ImportLog
job.fieldImport.interval=300
Explanation:
Imports items for modules
101
and102
on site1
.The job runs every 5 minutes.
Import files are processed from the drop directory and backed up after successful import.