Skip to Content

Migrating Data to Drupal

Here are some tips to help you with moving from a database like Filemaker Pro to a Drupal site. I presume you have CCK on your Drupal site and your content types are set. I recommend using node import to migrate the data to Drupal.

Before I import the data I have had cases where I need to clean it up and put in headers in some cases. I use excel for that. But I recommend using the “Text Import Wizard” in excel that will allows you to set which columns should be read as text and not converted into an excel type. A quirk about text import wizard is that it will open automatically only when using text files and not csv. So you can convert you csv files to text and use the wizard.

If you are importing data that has relations, I would first setup the content types in Drupal with node references so link content that has relations. To import data into Drupal that has relations first import the first content type that is referenced by others. For example: If you have fruits referenced in recipes, you import all the fruits first and then the recipes that links to fruits. In your previous database you probably had some id that you used to create the relationship. For example: fruit id would be stored in recipes to link fruit to recipes. In Drupal, node id is going to serve as the reference. So to import data that will reference other nodes I first get a list from the Drupal site with node ids and names and my previous database id. I use excel then to match the node id with the previous database id. For example, if I have recipe that references Mango with old id 12345 and now Mango’s node id is 234 I match 12345 in recipe and replace it with 234. To help automate this matching I use VLOOKUP in excel. In the below images, I used the name to match records.

Node import for Drupal makes importing really easy but you have spend some time making sure your data can easily fit in to the content types you have setup and I hope the above tips help you with importing your data.

Author: Daniel Mundra, CASIT Programmer