The website I am creating needs to import a medium sized database into my new Drupal system. I will be able to do an SQL export on the old database but I am wondering if there is a good module that my facilitate this kind of transfer. Also, I might like to make some changes to the structure of the database, for example one table I will need to import has 39 integer that I would like to move into one single vector, is this something I could do with an existing module or would I need to write some php code to handle this?


The Migrate module, not to be confused with Backup & Migrate, can provide this functionality. The project page says it better than I can.

The migrate module provides a flexible framework for migrating content into Drupal from other sources (e.g., when converting a web site from another CMS to Drupal). Out-of-the-box, support for creating core Drupal objects such as nodes, users, and comments is included - it can easily be extended for migrating other kinds of content.

Deliberately, it's fairly complicated module. Here's a talk on it from DrupalCon denver

| improve this answer | |

In Drupal 7, the Feeds module may be what you're looking for. You may need to export as RSS/Atom, CSV or XML first but you can use Feeds to import the data into Drupal. You can set your field types as you configure the content type you're going to import into.

I find Feeds is very well suited for one time imports that contain simple data. IMO if you need to do frequent or giant imports or would simply rather use the table you've already created I would consider creating a custom module implementing hook_schema() and hook_views_data() to access your table using Views directly.

| improve this answer | |

You could leave your data structure and integrate it with views, which gives you a powerfull reporting tool. Have a look at the maillog module as an example of integrating dB tables with views.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.