Job Step: Job Step ImportKeyValueMapping

Job Step ImportKeyValueMapping

Import or delete a key/value mapping in the Generic Mapping high-performance data store.

Key/value mappings are exposed through Script API class dw.util.MappingMgr. See Generic Mapping

Execution Context:


Parallel Execution:

Not Supported

Always execute on restart:


Input Parameters

AfterImportFileHandling : String Required

What to do with the import file after successful or failed import. The handling is not performed if ImportFailedHandling is ERROR and the file failed to validate. Ignored if using import mode 'Delete'.

Allowed Values: Keep, Delete, Archive, Archive Zipped

Default Value: Archive

ArchiveFolder : String Optional

Folder to store archived import files. Used when 'AfterImportFileHandling' is 'Archive' or 'Archive Zipped'. Folder location relative to 'IMPEX' folder. If not defined, 'IMPEX/archive' is used. Ignored if using import mode 'Delete'.

Default Value: archive

FileNamePattern : String Optional

Regular expression pattern to select the import files, e.g. 'import_.*\.csv'. Matching files are imported in alphanumerical order. If not defined all files in working folder are imported. Ignored if using import mode 'Delete'.

ImportFailedHandling : String Required

WARN - Skip malformed files. Perform action specified by AfterImportFileHandling on files. Use Exit Status WARN. ERROR - If invalid file is found, do not perform action specified by AfterImportFileHandling and abort immediately with Exit Status ERROR. Ignored if using import mode 'Delete'.

Allowed Values: WARN, ERROR

Default Value: WARN

ImportMode : String Required

Replace - Create new mapping or replace existing mapping, Merge - Create new mapping or update/create values in existing mapping, Delete - Delete specified mapping. All import file related parameters are ignored.

Allowed Values: Replace, Merge, Delete

Default Value: Replace

KeyCount : Long Optional

Number of columns in CSV file that are composite key columns, from left to right. Default is 1, which indicates that the first column in CSV file is a key. All other columns are an aggregated list of values. Ignored if using import mode 'Delete'.

Default Value: 1

MappingName : String Required

Name used to access the mapping. Example: 'backend-to-web-skus' or 'web-products-to-backend'.

WorkingFolder : String Optional

Folder containing import files, relative to 'IMPEX/src'. If not defined, working folder is 'IMPEX/src'. Ignored if using import mode 'Delete'.

Exit Status


Import or deletion finished successfully.


File validation problem and parameter 'ImportFailedHandling' is 'ERROR', or other persistent error.


File validation problem and parameter 'ImportFailedHandling' is 'WARN'.


No matching files were found.