Drupal Importing Nodes with the Feeds Module

node import

Drupal Importing Nodes with the Feeds Module

If you've ever been part of a site migration project, then you probably understand the challenges that come with moving a large amount of data. Now, for the sake of comparison I'm going to assume that you've already cleaned up your data and have it ready to import from something like a .txt or .csv file. Personally, I've built numerous affiliate product sites and a couple of e-commerce and so I know that getting the data in a suitable format can be challenging. Historically I've used Node Import, but while the functionality was decent; one little mistake and you had to start the tedious 8 step process all over again. Get to the final step and fail a few times in a row and you'll start to get pretty frustrated. Now for some reason it hit me the other day that the Feeds module would import from a .csv file and I thought I'd give it a try. To my surprise, it was actually easier than I anticipated; so here's just a synopsis of my findings.
  1. Clean your data - I know I made the assumption earlier that you'd already done that, but I can't actually stress how important it is to have you data ready to go, it will save you a lot of /admin/node/edit time.
  2. Assign a GUID - Drupal and the Feeds module need some way to uniquely identify content and that's what GUID does. Typically you'll want this to be something that doesn't need to be shown to the users, you might even have to add a table for it during import. One important thing to note is that if you fail to set this value with a .CSV file import then feeds will get stuck in an endless import loop (not good).
  3. Set Refresh to Never - Once you've done the import, the file will still be sitting on your server, and feeds will continue to try and import the file on a regular basis.
  4. Copy and Paste your Mappings - Since you'll actually have to use the exact same name in the mappings area as you have on your data rows, copy and paste them from one system to the next to avoid any data not being properly transferred.
  5. Test a Small Sample - One thing Node Import did do, that you can't do using this format, is get a small preview of what/where data was going before you did the import. So, unless you want to spend a lot of time deleting or editing nodes, be sure to do a sample run first of 2 or 3 nodes that can easily be deleted but will provide some valuable import feedback.
As with any new tool in Drupal, it typically takes a little trial and error for me to get my hands around exactly how to set it up. I did watch a couple of video screen casts, but the information was pretty basic and didn't really help me address some of this issues I mentioned above. Hopefully you've not got a little better understanding of some of the problems you might encounter and will be better equipped to get yours right the first time!

Related Posts

Aggregate Your Social Media Feeds in Drupal

Rachel
Read more

Introduction to Drupal nodes

Tom McCracken
Read more

Promote Your Events with Feeds

Tom McCracken
Read more

Drupal Lingo: Modules, and Nodes, and Views! Oh my!

Rachel
Read more

If you aren't using Entity API to create nodes, you are doing it wrong

Randall Knutson
Read more

Drupal Content Optimizer Module Makes SEO a Breeze

Chris Sloan
Read more