我正在使用 Drupal 构建我的第一个数据库驱动的网站,我有几个问题。
-
我目前正在使用我希望最终能够从网站查询(导入后)的所有数据填充 Google Docs Excel 电子表格。 这是最好的开始方式吗?
-
如果这不是最好的开始方式,您会推荐什么?
-
我的计划是填充电子表格,然后通过 CCK 节点将其作为 csv 导入到 mysql 数据库中。
我的计划是填充电子表格,
我见过两种方法可以做到这一点。
http://drupal.org/node/133705(将数据导入CCK节点)
http://drupal.org/node/237574(使用电子表格/csv而不是SQL插入语句插入数据)
基本上是我的问题是收集数据然后将其导入到 drupal 中的最佳方法是什么?
预先感谢您的任何帮助、建议。
I am building my first database driven website with Drupal and I have a few questions.
-
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?
-
If this is not the best way to start what would you recommend?
-
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.
发布评论
评论(2)
http://groups.drupal.org/node/21338 上有可用模块的比较
过去,当我完成此操作时,我只是编写代码在 cron 运行上执行此操作(请参阅 http://drupal. org/project/phorum 是一个示例框架,您可以剥离并重新构建它来完成您需要的操作)。
如果我现在这样做,我可能会使用 http://drupal.org/project/migrate模块的理念是“将其输入 MySQL,查看数据,通过 GUI 导入”。
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."
有一个非常好的模块可以做到这一点,即节点导入。 它允许您获取 GoogleDocs 电子表格并将其导入为 .csv 文件。
它真的很容易使用,该模块允许您将 .csv 列映射到您希望它们转到的节点字段,因此您不必担心以特定顺序设置列。 另外,如果某些记录有错误,它会输出一个 .csv 文件,其中包含错误文件以及导致错误的原因,但会导入所有正确的记录。
我用这种方法导入了多达3000个节点。
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.