Import content to nodes and populate Relativity?

boabjohn - June 30, 2009 - 07:11
Project:Node Relativity
Version:6.x-1.2
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

This module provides a lot of relational power. Great stuff. Yet it seems liek the paradigm is to install/configure and then start adding nodes ONE AT A TIME...I'm wondering though how I can best implement a site with lots of nodes already in a relativity-friendly graph.

Eg, I have a collection of content types all set up in a nice heirarchy, and I have defined all my relations between the types.

Now, I'd like to systematically import the content (several hundred nodes) which has been carefully prepared and stored in .xls.

Starting from the top content type I can do the first import and get a set of NID values, which could then be used to populate the "parent ID" for each of the children while they are still in their .xls. Now I can import the children, and they come in with a parent ID. Now the children have NIDs, and I could export these, assign them to their parents. and re-import (update) the parents.

And so on down the line....

This could save heaps of time since each parent could have several dozen kids in my scenario.

I know it sounds a bit daft, but otherwise what am I to do with a structure that Relativity handles beautifully...but I've got hundreds of nodes to get started with?

Now, at the moment, when I try to use content import, I can't see any Relativity fields...thus I can't populate via a nice import module.

Just a thought...if I don't hear back within a few days some poor chopshop is going to get a contract to copy and paste for the next week....

Cheers!

#1

darius - June 30, 2009 - 13:40

Please take a look at "relativity" database table. It's very simple, only two fields: nid and parent_nid. If you know node IDs and parent-child relationships, just add them to the relativity database table.

#2

boabjohn - July 3, 2009 - 07:45

Thanks Darius, but I'm still adrift. I don't really know MySQL from the command line, and have to use module-based tools, like Node Import, to do even "simple" database updates.

The Node Relativity table is not available to Node Import, of course...

So Just downloaded Table Wizard, and I can see the table structure, but have no idea how to insert the data itself.

Following your suggestion, I have a table with two columns, and these should match the parent/child strucutre. But how to get the values actually into the table?

Thanks!

#3

darius - July 10, 2009 - 14:44

GUI database clients like PhpMyAdmin or others can help you import data for csv or text formats.

#4

boabjohn - July 16, 2009 - 01:16

Yes. Thanks for the follow-up. I am now using PHPMyAdmin.

#5

boabjohn - August 19, 2009 - 10:44
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.