views:

1829

answers:

3

I am building my first database driven website with Drupal and I have a few questions.

  1. I am currently populating a google docs excel spreadsheet with all of the data I want to eventually be able to query from the website (after it's imported). Is this the best way to start?

  2. If this is not the best way to start what would you recommend?

  3. My plan is to populate the spreadsheet then import it as a csv into the mysql db via the CCK Node.

I've seen two ways to do this.

http://drupal.org/node/133705 (importing data into CCK nodes)

http://drupal.org/node/237574 (Inserting data using spreadsheet/csv instead of SQL insert statements)

Basically my question(s) is what is the best way to gather, then import data into drupal?

Thanks in advance for any help, suggestions.

+3  A: 

There's a comparison of the available modules at http://groups.drupal.org/node/21338

In the past when I've done this I simply write code to do it on cron runs (see http://drupal.org/project/phorum for an example framework that you could strip down and build back up to do what you need).

If I were to do this now I would probably use the http://drupal.org/project/migrate module where the philosophy is "get it into MySQL, View the data, Import via GUI."

greggles
A: 

I'm very interested in this subject too and would like to know what you choosed and how you succeeded with it, please share?

A: 

There is a very good module for this, node import. It allows you to take your GoogleDocs spreadsheet and import it as a .csv file.

It's really easy to use, the module allows you to map your .csv columns to the node fields you want them to go to, so you don't have to worry about setting your columns in a particular order. Also, if there is an error on some records, it will spit out a .csv with the error files and what caused the error, but will import all good records.

I have imported up to 3000 nodes with this method.

cinqoTimo