Forums / General / Question on importing taxonomies and CSV files

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

eZ debug

Timing: Jan 18 2025 04:59:09
Script start
Timing: Jan 18 2025 04:59:09
Module start 'content'
Timing: Jan 18 2025 04:59:10
Module end 'content'
Timing: Jan 18 2025 04:59:10
Script end

Main resources:

Total runtime0.6899 sec
Peak memory usage4,096.0000 KB
Database Queries205

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 587.8359180.8203
Module start 'content' 0.00730.5492 768.6563607.0469
Module end 'content' 0.55660.1333 1,375.7031337.3750
Script end 0.6899  1,713.0781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.5767210.0002
Check MTime0.00140.2055210.0001
Mysql Total
Database connection0.00100.151810.0010
Mysqli_queries0.614789.09032050.0030
Looping result0.00230.32792030.0000
Template Total0.654994.920.3274
Template load0.00160.234520.0008
Template processing0.653394.684120.3266
Template load and register function0.00020.034210.0002
states
state_id_array0.00100.151910.0010
state_identifier_array0.00110.164220.0006
Override
Cache load0.00140.1967350.0000
Sytem overhead
Fetch class attribute can translate value0.00120.177240.0003
Fetch class attribute name0.00150.216370.0002
XML
Image XML parsing0.00110.162340.0003
class_abstraction
Instantiating content class attribute0.00000.001970.0000
General
dbfile0.00330.4780280.0001
String conversion0.00000.001230.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs