Transformation (3a. Metadata Mapping)
Warning: this flow will overwrite the target.contentType and target.properties fields.
The metadata mapping flow is used to set the content type and metadata fields on the objects that are to be migrated. Most systems have a form of content types, document types, or case types. If the source and target system have content types, they also need to be mapped from source type to target type. A content type is usually coupled to a specific set of fields. If the mapping rules for some fields are different between different content types, a field mapping is needed for every content type (example: field1 of content type A has a different mapping rule than field1 of content type B).
This flow reads an Excel workbook containing the content type mapping and field mapping. For all objects that are to be migrated, these mappings will be applied to set the content type and their metadata fields.
Two sheets are mandatory: Content Type Mapping and Field Mapping. An example of these mappings is shipped with the accelerator (Content type & Field mapping.xlsx).
The Content Type Mapping sheet is used to transform the source content type to a target content type. The columns in this sheet are:
*Source SystemName: Refers to thesource.contentType.systemNameof the object.Source DisplayName: Refers to thesource.contentType.displayNameof the object.Target SystemName: Refers to the target content type's system name of the object and is stored intarget.contentType.systemName. When left empty, the display name is used.Target DisplayName: Refers to the target content type's display name of the object and is stored intarget.contentType.displayName.Comments: Optional column to insert remarks.
The Field Mapping sheet is used to transform the properties (fields) that are available on the target content type. The columns in this sheet are:
*Source Content Types SystemName: Refers to thesource.contentType.systemNameof the objects for which this mapping has to be applied. Values in here should be comma separated.Source Content Types DisplayName: Optional column containing thesource.contentType.displayNameof the objects for which this rule has to be applied.Source DisplayName: Optional column with the display name of the source property to be mapped.Source Content Store Path: The location of the property in the object, for example:source.properties.category.*Target SystemName: The system name of the target property that is mapped to.Target DisplayName: The display name of the target property that is mapped to.Target Content Store Path: The location to store the property in the content store object, for example:target.properties.category. When left blank, it will be stored intarget.propertieswith the name specified in theTarget SystemNamecolumns. Please reference the specific target connector documentation on how to correctly set these property paths.Target Type: The type of the target property.Rule: Optional column for the rule that has to be applied. Supported values are:sheetandfixed. Asheetrule references another sheet in the Excel workbook for a value mapping, and afixedrule indicates that a fixed value should be used (specified in columnParameter). Additional rules can be added in the code component with idillf34cngand notemap object metadataat the line with commentADD CUSTOM RULES HERE.Parameter: The parameter for the rule that has to be applied. When the rule is set tosheetthe parameter indicates the name of the sheet. In that sheet there should be a mapping from a source value to a target value. Required columns are:*Source: value found in the source for the specified mapped field.Target: target value to be set.
The values which correspond to the source are essentially the unique combinations of the content type and field values that are found in the source objects. These may be extracted from the source database, but it is highly recommended to use the Metadata Fields Report to determine these values. The values *Target SystemName and Target DisplayName are the values that need to be set to the content type fields that are available in the target system. These may be retrieved from the target database or the target system directly, but it is highly recommended to use a report here too. For example, for SharePoint Online, the Content Types SPO Report can be used to determine the content types and fields available in the target environment.
There is an example on how to apply rules in metadata mapping in this code component (illf34cng).
In the provided example workbook there is a category rule and corresponding sheet.
Max Length: The maximum string length of the mapped value. When it exceeds this value, an error is thrown by the flow.Format: Optional column that specifies a value conversion. Supported values are:stringandtoIsoDate.Comments: Optional column to insert remarks.
Values such as SystemName, DisplayName and Content Store Path refers to the values of the matching fields in the Content Store. The values can be retrieved directly from the Content Store, but it is highly recommended to use the Metadata Fields Report to determine these values.
Please reference the specific target connector documentation on how to correctly set values for specific properties, e.g. managed metadata (terms), person or group properties.
Settings
mongoConnection
The Mongo connection string including the database name to connect to.
contentTypeFieldMappingPath
The path to the Excel workbook containing the content type and field mapping. There should be two sheets: Content Type Mapping and Field Mapping.