Re: Importing Data (like autolinks) From Export Files

[email protected] (mikespub) Fri, 27 Jun 2003 17:54:25 GMT
Newsgroups gmane.comp.cms.xaraya.knowledge-base
Organization not much
Message-ID <[email protected]>
In article <bdht9s$ikn$1-111RdWWlOxkOkXtL6OYfHgC/[email protected]>, "J. Cox" <[email protected]> wrote:
>Quick, Down and Dirty Import Steps (for use for data items like autolinks,
>etc).  Mike, correct me if I am wrong;)
>
>DD --> View Objects
>Click View Properties for the module wanted.
>Click Show Static Properties and Relations
>Click Import Table (table_name)
>
>GOTO DD --> Utilities
>Import objects and definitions
>Select Data File and Upload.
>
>Your module should now have the data that was imported.

Two comments :

1) if you have the same table on both sides, you can export
the object definition too (not only the data), and import that
XML file first - handy e.g. when you customize the properties
for that object and you want to keep those customisations, or
when you have a mix of data from a static table plus extra
dynamic fields.

If you export both the object definition and the data, you
can reproduce the exact same object on the other side.
Incidently, you can put both the object definition and
the data in a single XML file as well - just look at the
modules/dynamicdata/sample.xml file for instance :

<object name="...">
  ...
  <properties>
    ...
  </properties>
  <items>
    ...
  </items>
</object>

Import of large tables may take a while, but I've managed
to import a couple of thousands of articles in this way
- just as a test of course.

Creating extracts from one table (e.g. some *_users table)
and importing them into some comparable object on the
other side (e.g. xar_roles + DD extensions) is also
possible, but requires some tuning of the XML object
definition. That's why we have import scripts instead,
to handle the more tricky conversions :)


2) if all you need is to copy over your autolinks table (or
whatever), it's probably easier to use phpMyAdmin or
a mysql client to dump the whole table on one side,
and load it on the other side. DD import/export is not
always the best (or quickest) solution :-)


Mike.