In this article, you'll learn what it takes to migrate UniGrid data from Kentico CMS to Kentico Kontent using the Migration tool.
In the previous article, we have learned how to migrate pages data in JSON format from Kentico CMS to Kentico Kontent 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 Kontent project.
Prepare the Kentico Kontent 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 Kontent project.
In Kentico Kontent, I have to enable the Content Management API and the Delivery API.
At this stage, the Kentico Kontent 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 Kontent 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 Kontent 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 Kontent 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 Kontent 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 Kontent Content inventory.
When the process fails the Logs area gives you a hint of 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
- Xperience by Kentico
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 …
I created an app for the Anybody hotel that controls Philips Hue lights. However, before I was able to design and implement the app, I researched the possibilities of the technolog…
- Xperience by Kentico
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…