Menu

#2691 (ok 3.1.2) Yaml export, not really usable !

2.11.5
fixed
1
2013-06-11
2008-05-13
Julien G
No

Let say, we have the following DB structure :

Table : "human"
------------------
| id | name |
------------------
| 1 | Joe |
| 2 | Bill |
------------------

Table: "animal"
------------------
| id | name |
------------------
| 1 | Rex |
| 2 | Pepet|
------------------

(And an other table to link pets to humans)

An Yaml export will give this :
--------------------------------
1:
id: 1
name: Joe
2:
id: 2
name: Bill
1:
id: 1
name: Rex
2;
id: 2:
name: Pepet
---------------------------------

This is just unusable !!!

There is a lot of way to have a better Yaml export:

Use same format as XML export
--------------------------------
myDBname:
human:
1:
id: 1
name: Joe
2:
id: 2
name: Bill
animal:
1:
id: 1
name: Rex
2;
id: 2
name: Pepet
---------------------------------

Without DB name:
--------------------------------
human:
1:
id: 1
name: Joe
2:
id: 2
name: Bill
animal:
1:
id: 1
name: Rex
2;
id: 2
name: Pepet
---------------------------------

Flat, but with table name:
--------------------------------
human_1:
id: 1
name: Joe
human_2:
id: 2
name: Bill
animal_1:
id: 1
name: Rex
animal_2;
id: 2
name: Pepet
---------------------------------

Or, at least, using comments:
--------------------------------
# myDBname.human
1:
id: 1
name: Joe
2:
id: 2
name: Bill

# myDBname.animal
1:
id: 1
name: Rex
2;
id: 2:
name: Pepet
---------------------------------

I personnaly prefer the first version...

Discussion

  • Michal Čihař

    Michal Čihař - 2008-09-03

    Logged In: YES
    user_id=192186
    Originator: NO

    Feel free to create patch for the export, it should be pretty easy (you can find code in libraries/export/yaml.php). The current version was contributed by some user and we have no knowledge about YAML in our development team.

     
  • Michal Čihař

    Michal Čihař - 2008-09-03
    • priority: 5 --> 3
     
  • Marc Delisle

    Marc Delisle - 2008-12-12
    • priority: 3 --> 1
    • assigned_to: nobody --> lem9
    • summary: Yaml export, not really usable ! --> (ok 3.1.2) Yaml export, not really usable !
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2008-12-12

    Fixed for 3.1.2 by adding comments, thanks to Bryce Thornton.

     
  • Marc Delisle

    Marc Delisle - 2009-01-19
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     
MongoDB Logo MongoDB