Bulk Import Data in Drupal
Time Equals Money
According to Node Import's project page, "This module allows you to import a set of nodes from a Comma Seperated Values (CSV) or Tab Seperated Values (TSV) text file." In plain language, Node Import saves you time! It's a module that allows you to take a list of your content, organized into columns of data of course, and import it into your Drupal site in one shot. Why is this important? Because with Node Import, you don't have to manually upload your products, blog posts, web pages, etc. one by one. Instead the module does the heavy lifting.
For someone new to Drupal, like I was, one of the tough things to wrap your head around is the concept of nodes vs. pages. Pages are the actual rendered products that are displayed by a web browser to a user but they can consist of multiple nodes. Each piece of content you create is itself a node. Confused yet? It gets better. When Drupal saves a node you've created, it saves information to a number of different tables within your database. This is what makes bulk content creation difficult for a non-programmer, you would have to know which tables need to be updated and what info to put in. Enter Node Import.
Created by Robrecht Jacques, Node Import handles all the back end complex functions associated with creating nodes, like updating tables. Through an 8 step process, the module takes you through uploading an appropriate Comma Seperated Value file, with UTF-8 formatting, to mapping your columns, to previewing your data, to ultimately creating your nodes (it's definitely more complicated than that - I tried looking through the code - but you get the idea). However, Node Import doesn't work with everything. While is works with common content types like blogs, books, comments, and taxonomy (assigning terms to nodes), it doesn't work with forums, polls or many other contributed modules. For instance, it works with Ubercart but only with UC_Product.
So what's the point?
I wrote this post because I think Node Import is undervalued and under used. As everyone quickly learns, there are often many ways of accomplishing the same task in Drupal depending on preference. However, Node Import offers a very friendly user interface and effective module to help users migrate non-Drupal sites over to Drupal for those without a programming/PHP/MySQL background. However, it's not all roses. There were a few times when I first started using the module that I got the white screen of death including trying to upload products using IE8 and not using the dev version of the module.
Additionally, I quickly learned how important it is to scope out your project's modules and themes before starting a project. Let me give you an example. I was creating an e-commerce website and initially thought the company had two types of products to sell. Both product types had similar features but because they were classified differently by the company itself, I thought it best to create two custom Ubercart product types. Mid-way through the project though, the company decided it did not want to sell one of the product types on its website. This meant all products on the website were of one specific product type. After I started the project, I found Node Import but as I mentioned before, Node Import only works with standard UC products. As a result, I could use Node Import but taxonomies weren't added properly and images were saved. So each time I imported, I had to go through each product to update those fields. I found a solution though - using the Views Bonus Pack Export feature, I exported all products to a CSV and then re-import the file with Node Import. So to avoid similar problems, scope out the project early and make sure your modules are compatible.
Lastly, if you decide to use Node Import, make sure to check out . It's an excellent add-on!

Comments
You can upload content in
You can upload content in languages versions - good! But how can you tell Drupal that the imported "node2" in English should be the translation of the other imported "node1" in German?
I'm not really sure, I
I'm not really sure, I haven't done any translations with node import so not sure I could help you... Anyone else have some ideas?
Sorry,
pete
Unicode character is not supported
Hi,
I am using node import module to import content into my drupal site. When I am inserting content other than english language, unicode character is not supported through node import module.
Can anyone help me out?
Thanks for your help.
Post new comment