HowTo: Transform Metadata Using Function Mapping
While a direct one-to-one metadata mapping suffices in most cases it can be useful to perform various transformations on the metadata as part of the migration: to this end Proventeq Migration Accelerator offers a comprehensive and powerful scripting environment that allows you to define any metadata mapping through fully fledged PowerShell and Python scripts.
A common use case for metadata transformation might be the mapping of a Document ‘Name’ field that has a greater string capacity in the source system than in the target, a mapping could be used to truncate the source value if it exceeds the bounds of the target field. This use case is illustrated in figure 15.
Script Mappings are ideal for individual usual cases whereas Function Mappings are preferable for more generic operations that can be used across multiple metadata mappings (i.e. string concatenation, date formatting). In both cases the scripts can be provided direct access to the active item’s variables, where they can be read and modified with ease.
Using Function Mapping
- Click on the “Settings” button in the “Migration Tasks” pane at the bottom of the Proventeq Migration Accelerator Home screen for the selected Migration Task.
- Select the “Content Type Mapping Settings” tab in the “Migration Task Settings” window if it is not already open.
- Click on the “Settings” button of the desired Content Type mapping in the “Mappings” pane.
- Select Function as a Mapping Type from Mapping Type drop down
- Select Mapping Type as Script from Metadata Mapping window as shown in below image
- Click on Select button shown in below image.
- Select a function to which field you want a transformed metadata e.g. Concat function as shown in below image. You can have options to Add, Edit, View, Delete and Test Function. Once that is done Click on Select button at the bottom of Select Function window.
- Provide Source values as shown in the figure below as per your requirement to transform metadata field value. You can provide Metadata as well as Constant values for source fieldsClick on the “Save” button.
- Click on the “Save” button.