Question on importing taxonomies and CSV files

Author Message

Noel Dickover

Monday 08 September 2003 3:36:12 pm

Greetings,

I am working on merging three different websites into a single website and am in the process of evaluating and leaning towards eZ publish as a question on importing data in eZ publish.

We have a rather large set of taxonomy items (folders in eZ terms). I was wondering if there is an easy way to import a hierarchical set of folders into eZ publish. The web interface is clean and useful for updating, but would take a long time to develop the folder structure.

Any thoughts on this would be most appreciated.

Paul Forsyth

Tuesday 09 September 2003 1:14:18 am

This isn't quite ready yet. Version 3.3 will allow imports, transforms of items into ez objects.

To do this you would need to write some php code that read your .csv and then created ez objects. Not too hard but its a steep learning curve to start with.

Paul

Noel Dickover

Tuesday 09 September 2003 7:41:22 am

Paul,

I apreciate the quick response. Tell me though, is it possible to do other types of imports? We have a lot of data in oracle tables that we were displaying with CFM pages, but really the data is pretty cut and dried HTML. Can we go directly to the MySQL database in put this in directly as an article type for instance or is their any type of import script for this?

Thanks again,

Noel

Paul Borgermans

Tuesday 09 September 2003 8:16:17 am

If you need to keep your oracle RDBMS, you may as well create your own datatype for the records in the database. When creating objects with this new datatype, you can for instance specify the key to use (which is stored inside ezp tables). This makes it possible that "foreign" data is integrated with ez publish, including all the benefits ...

Not so easy, but may be worth the effort depending on what you want to do.

We face the same problems on the taxonomy ... and finally did it by hand in the admin interface except the few things we could migrate from an ezpublish 2.2 site.

If you have your taxonomy as a folder structure in a file system, you could do this with teh upcoming webdav interface too (perhaps create the folders first with a simple script if the taxonomy is inside a database or csv file)

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Noel Dickover

Tuesday 09 September 2003 8:44:20 am

Hi Paul,

I greatly appreciate the response. We don't need to keep the Oracle RDBMS. Was just again wondering if I can find a quick way to import lots of records into Ez PUblish. I'm doing part of the taxonomy by hand via the interface now as a test. Is it possible to just swallow the tables without too much trouble into MySQL and have the data display properly? I haven't looked at the table structure yet.

Thanks again for answering these newbie questions!

Paul Forsyth

Tuesday 09 September 2003 10:22:50 am

I think you need to think about your end aim here and work out the necessary steps.

For example, take a look at creating an ez class and determine whether your data can be modelled in the way you need it to be. If you can create a class with attributes that matches the structure of your data then all you need to do is create the ez objects.

This is, as you might guess, a little more difficult to do. You mention csv data so i assume you have a way of exporting your oracle fields into a handle text file.

Paul mentioned using webdav, which is new in 3.2. You could use that to 'drop' in files, which will create the correct objects (for the files mime type) in the database. For that you may need to alter the webdav code a little to match the type for your class.

However a little script to read your csv file, and create the objects inside ez looks like the best way to go. I've worked on similar things, its just a matter of finding what function calls to use.

Paul

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 22:26:56
Script start
Timing: Jan 30 2025 22:26:56
Module start 'layout'
Timing: Jan 30 2025 22:26:56
Module start 'content'
Timing: Jan 30 2025 22:26:56
Module end 'content'
Timing: Jan 30 2025 22:26:56
Script end

Main resources:

Total runtime0.0222 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.2578151.2266
Module start 'layout' 0.00500.0041 739.4844220.7188
Module start 'content' 0.00910.0119 960.20311,001.8047
Module end 'content' 0.02090.0013 1,962.007837.9922
Script end 0.0222  2,000.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002511.0656140.0002
Check MTime0.00104.6571140.0001
Mysql Total
Database connection0.00072.980810.0007
Mysqli_queries0.003113.838530.0010
Looping result0.00000.045010.0000
Template Total0.00094.010.0009
Template load0.00073.191910.0007
Template processing0.00020.759910.0002
Override
Cache load0.00052.117910.0005
General
dbfile0.00031.137280.0000
String conversion0.00000.022540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs