Keep your Sharepoint in sync. Download and try today.
Office 365 document migration: How to assign managed metadata?
The Layer2 Cloud Connector can assign managed metadata automatically to documents during SharePoint Online migration from file servers using Dynamic Columns in C#.
When migrating from the local file system to SharePoint Online, assigning managed metadata to documents is a typical requirement to increase findability and search in the new portal. It cannot be done manually in case of a large document set. The Layer2 Cloud Connector can assign managed metadata automatically to documents as part of the SharePoint Online migration process using dynamic columns in C#. You can implement your own business logic to create appropriate metadata from existing columns like title or file path.
Fig.: Managed Metadata in SharePoint can increase document findability and search.
The following example shows how to set the value of a managed metadata column in a SharePoint library during migration to the folder structure that the source file resides in on the original file server. It is assumed that:
- the managed metadata list column is already bound to a SharePoint Term Set, and
- the existing SharePoint Term Set already reflects the folder structure.
The assigned SharePoint Term Set for example could look like that:
- RootFolder
- RootFolder=>FolderA
- RootFolder=>FolderA=>FolderA-A
- RootFolder=>FolderA=>FolderA-B
- RootFolder=>FolderA=>FolderA-C
- RootFolder=>FolderA=>FolderA-C=>FolderXYZ
- etc.
Learn more about managing SharePoint Term Sets for import, export, and deployment using SKOS here.
1. Create a Dynamic Column at the File System data source
A Dynamic Column can be created at the File System data source entity in the Layer2 Cloud Connector data entity connection settings. There are no changes in the file system. It is just an additional calculated column.
Fig.: Add additional Dynamic
Columns to your source data can help with calculations, transformations,
translations, and any other business logic.
2. Calculate the value of the new Dynamic Column
You can calculate the value of the Dynamic Columns as follows:
Fig. Apply the source file path as SharePoint managed metadata using C#
3. Assign the Dynamic Column to your existing managed metadata column
Don't forget to assign the newly created Dynamic Column to your existing managed metadata column in the connection's mapping section.
Known issues and workarounds
Please note the following possible issues and workarounds:
- In this example the FilePath value is not written back to the file system (because there is no set method), so in case someone changes the value of the managed metadata column on the SharePoint side, the change will be ignored in the next synchronization on the file system side (although it notifies about an update). The next synchronization will then automatically correct the value on the SharePoint side back to the actual path as found on the filesystem.
- Assigning a source file path as managed metadata is typically used together with another option to remove all folders from the file path on the SharePoint side resulting in a flat library structure. Please take a look into the User's Guide about how to manage this.
- Assigning the file path as managed metadata is just one example. You could also assign specific calculated values based on the document name, title, author or other given properties. You can make calculations, transformations and translations for this, for example using a translation table assigned by a CSV or Excel file. Please take a look into the User's Guide about how to manage this.
- Assigning managed metadata is just one feature the Layer2 Cloud Connector can offer regarding document migrations. There are a lot more of this, for example SQL-like queries to include / exclude folders or files by name, size, type or age to / from migration.
- You will find more general information about using the Layer2 Cloud
Connector for document migration, backup and synchronization here.
Conclusions and next steps
Assigning managed metadata to documents when migrating from file system to SharePoint can highly increase findability and search in the new portal. It can be done automatically during migration using the Layer2 Cloud Connector Dynamic Columns feature. You can download the Layer2 Cloud Connector after free registration here.
Explore frequently asked questions by topics.
READY TO GO NEXT STEPS?