In this article, you'll learn what it takes to migrate UniGrid data from Kentico CMS to Kentico Cloud using the Migration tool.
In the previous article, we have learned how to migrate pages data in JSON format from Kentico CMS to Kentico Cloud using the Migration tool. This article will focus on migration data that could be exported in the CSV format from UniGrids in Kentico CMS.
In my Kentico CMS instance, I have a custom table. I intend to migrate the custom table data to a Kentico Cloud project.
Prepare the Kentico Cloud project
My custom table has three fields I would like to migrate. I create a new content type that reflects the custom table in the Kentico Cloud project.
In Kentico Cloud, I have to enable the Content Management API and the Delivery API.
At this stage, the Kentico Cloud project is ready to receive data from Kentico CMS.
Prepare migration data
In Kentico CMS I export UniGrid data in CSV format directly from its header.
Now, I need to find out how to structure the first line of the CSV file so that the Migration tool maps each column to the appropriate field in the Kentico Cloud project. I can generate a blueprint that outlines the first line in the Migration tool. I use it here: https://migration-tool-kentico-cloud.herokuapp.com/ or run it locally from the repository. In the Project settings area, I fill in Project ID. Then, available content models populate in the Content model selector. I choose Sample table, switch to CSV in the Import data area and hit the Generate blueprint button.
I grab the blueprint and replace the first line in the CSV file I have already exported from Kentico CMS.
In my case, I don't need the sitemap_locations field, so I remove it. I also need to replace the language_codename string with the real codename of a language in my Kentico Cloud project.
I need to re-order the columns to fit the data on the lines below. I also need to add types to the data records.
Now, I have the data ready to be imported into the Kentico Cloud project.
I visit the Migration tool here: https://migration-tool-kentico-cloud.herokuapp.com/ or run it locally from the repository.
In the Project settings area, I fill in Project ID and relevant Content Management API key of my Kentico Cloud project. In the Import data area, I paste the CSV object and switch the format to CSV.
Then I hit the Import data button and watch the migration process in the Logs area. When the migration process is successful, ids and codenames of imported items appear in the Import data area. Also, I can see the new items in the Kentico Cloud Content inventory.
When the process fails the Logs area gives you a hint what causes the issue.
In this article, we have learned how to export UniGrid data from Kentico CMS, edit them to fit the required structure of the Migration tool and import the data.
Further readingall posts
- Kentico CMS & EMS
Social media networks need more information about your content than just an url to be able to display it in their feeds. For such a purpose we put open graph meta tags in the head …
- Kentico CMS & EMS
For any kind of form web parts, I like using update panel to avoid full page reload when the form is submitted. In such situation, a postback is invoked. When you execute a Javascr…
- Kentico Cloud
I've already done a few websites with Kentico Cloud in Node.js and I would like to share my experience. In this article I will show you how to request Kentico Cloud Delivery API in…