Introduction
Data migration can be necessary for a variety of reasons including adoption of new technology, consolidation of businesses or improving operational efficiency among others. Nowadays, migrating data across platforms is a very common practice across organizations. Data is often migrated to SharePoint from Google Drive, Box, Dropbox, OneDrive etc. to leverage full collaborated use of Office 365.
After a large SharePoint document library migration, it takes a while for the users to start using the data from SharePoint Libraries. This transition often frustrates users when they need to find files from the previous system. This is where a file locator tool becomes extremely useful. It enables the user, aids the overall adoption and change management process of the migration project.
In this article, I wish to share the details of such a SharePoint migration tool which can be used across platforms but with specific reference to a Google Drive to SharePoint Online migration.
How is the file locator tool post-migration app used?
The tool is a very simple app built using SPFx and hosted on a SharePoint page. For any migration, the system needs to have the mapping information of files between the source and SharePoint. The tool utilizes this mapping data and finds the destination URL in SharePoint for the user. Let us consider a sample app that maps Google Drive data to SharePoint.
The user can give ID/Name/Google Drive URL as input and the tool returns the corresponding SharePoint links to the files as a hyperlink which straight away takes the user to the document he/she is looking for. Below are the various ways in which users can search the target URL.
Case 1
The user can provide a file/folder name in Google Drive to get the link in the SharePoint environment.
Case 2
The user can provide a file/folder URL in Google Drive to get the link in the SharePoint environment.
Case 3
The user can provide a file/folder ID in Google Drive to get the link in the SharePoint environment.
How does the file locator tool generate the mapped URLs?
While migrating data one can generate Excel reports which contain the mapping information. The basic mapping reports are available in the in-built migration tool. This mapping information can further be streamlined in Excel format using report-generating custom tools or utilities. It can further be organized using Data Fabric. Once the data is obtained it can be maintained in a SharePoint list which can be inserted using Python / PowerShell scripts. The tool reads mapping data from this list to generate the mapped URLs.
How to use the file locator tool in case data is migrated from other sources?
This tool can be modified to map data from other places like OneDrive, Box, Dropbox, etc. Here is a snippet of the code that is at work. As mentioned above the mapping data of source URL and destination URL needs to be stored in a SharePoint list named GoogleDriveFileMapping. Then the SPFx application uses the below call to get the mapping data and find the destination URL. So, it is about inserting the mapping data correctly in the SharePoint list. Generate a simple report from the migration tool and utilities, then insert it into the SharePoint list using PowerShell or Python. Once data is inserted, the user can search for the desired file in SharePoint easily using the tool.
public async getItemsFromListCAML(
documentLibName: string,
listQueryInfo: ListQueryInfo
): Promise<any[]> {
try {
const list = pnp.sp.web.lists.getByTitle(documentLibName);
// Construct the CAML query
const camlQuery: string = `
<View>
<Query>
${listQueryInfo.filterString ? `<Where>${listQueryInfo.filterString}</Where>` : ""}
<OrderBy>
<FieldRef Name="${listQueryInfo.orderByColumnName}" Ascending="${listQueryInfo.orderByIsAscending}" />
</OrderBy>
</Query>
<RowLimit>${listQueryInfo.recordCount}</RowLimit>
</View>
`;
let results: any[] = [];
let continuationToken: string | undefined = undefined;
do {
const parameters = {
ViewXml: camlQuery,
ListItemCollectionPosition: continuationToken ? { PagingInfo: continuationToken } : undefined,
};
// Use renderListDataAsStream for data retrieval
const response = await list.renderListDataAsStream(parameters);
results = results.concat(response.Row);
continuationToken = response.ListItemCollectionPosition?response.ListItemCollectionPosition.PagingInfo:""; // Get the next token for paging
} while (continuationToken);
return results;
} catch (e) {
console.error("Error in getItemsFromList:", e);
// Prepare error logging
const data: ILogData = {
FileName: "SharePointDataProvider.ts",
MethodName: "getItemsFromList",
Stack: e.stack ? e.stack : "",
};
const logEntry: ILogEntry = {
message: `${e.message} - Library Name: ${documentLibName}`,
level: LogLevel.Error,
data: data,
};
Logger.log(logEntry);
throw e; // Rethrow the error for higher-level handling
}
}
Typical scenarios where the tool is useful
As we know there can be two types of Drives in Google – one is a personal drive and the other is a shared drive. When data is migrated from Google Drive to SharePoint Online for personal drives the usability is straightforward. This is because the file structure is the same as in Google Drive. So, it is easy to find the migrated files. However, there are scenarios where locating a file in the new system is not so straightforward.
Let us review a few such cases:
Ebook : 10 most important issues and how to solve them when migrating to SharePoint Online today!
To learn more about the benefits of migrating to SharePoint on the cloud and the steps involved, download Netwoven’s eBook which covers 10 tips and potential issues that may arise during migration.
Get the eBookConclusion
The adoption and change management process is extremely important for any new system to succeed. The user experience must be easy and seamless in dealing with the new system given the earlier behavior. In many cases, after migration, the user needs to be supported favorably to be able to find the desired document quickly. Whenever one is migrating data to SharePoint Online this kind of file locator tool is very helpful in bridging the gap between the two systems in the transition period. Hence, even though it is simple, it aids the user to search for the document efficiently improving adoption and productivity. Hope the blog is helpful. If you have additional queries, please reach out to us.