← Back to team overview

dhis2-users team mailing list archive

Re: DXF Detailed Metadata Export...

 

Hello Everyone
I also tested the metadata export/import and the import consistently fails. The best result I was able to get only created part of the data elements and data sets.
JM



El 08/04/2013, a las 16:43, Rodolfo Melia <rmelia@xxxxxxxxxxxx> escribió:

> Ola - I just tried, but unfortunately I only get the Data Element names, nothing else.
> Is there a switch to get all the properties of the object?
> 
> <dataElements>
> <dataElement name="KE - Microlut" created="2012-12-11T00:00:00.000+0000" lastUpdated="2013-03-04T15:55:29.351+0000"href="http://dev.psi-mis.org/api/dataElements/vV5rUtTs2gK"; id="vV5rUtTs2gK"/>
> <dataElement name="KE - IUCD insertions [Target]" created="2013-02-05T12:12:37.937+0000" lastUpdated="2013-03-07T09:19:22.614+0000" href="http://dev.psi-mis.org/api/dataElements/Fdb2XIirCaI"; id="Fdb2XIirCaI"/>
> <dataElement name="KE - IUCD removals" created="2013-02-05T07:35:49.543+0000" lastUpdated="2013-03-04T15:55:29.324+0000"href="http://dev.psi-mis.org/api/dataElements/QXaKhE3QH4v"; id="QXaKhE3QH4v"/>
> <dataElement name="KE - Implant insertions" created="2012-12-11T00:00:00.000+0000" lastUpdated="2013-03-04T15:55:29.331+0000"href="http://dev.psi-mis.org/api/dataElements/R6Il27oviAY"; id="R6Il27oviAY"/>
> <dataElement name="KE - Condoms" created="2013-02-05T07:35:49.546+0000" lastUpdated="2013-03-04T15:55:29.238+0000"href="http://dev.psi-mis.org/api/dataElements/vxwTVldLL3v"; id="vxwTVldLL3v"/>
> <dataElement name="KE - Injections" created="2012-12-11T00:00:00.000+0000" lastUpdated="2013-03-04T15:55:29.344+0000"href="http://dev.psi-mis.org/api/dataElements/Va0SNBrIArX"; id="Va0SNBrIArX"/>
> <dataElement name="KE - COC" created="2013-02-05T07:35:49.552+0000" lastUpdated="2013-03-04T15:55:29.231+0000"href="http://dev.psi-mis.org/api/dataElements/lcIUdP3C4vJ"; id="lcIUdP3C4vJ"/>
> <dataElement name="KE - IUCD insertions" created="2013-02-05T07:35:49.557+0000" lastUpdated="2013-03-04T15:55:29.276+0000"href="http://dev.psi-mis.org/api/dataElements/Ouc8q8P7LuO"; id="Ouc8q8P7LuO"/>
> <dataElement name="KE - Implant removals" created="2012-12-11T00:00:00.000+0000" lastUpdated="2013-03-04T15:55:29.338+0000"href="http://dev.psi-mis.org/api/dataElements/mvdI2hF1sRI"; id="mvdI2hF1sRI"/>
> </dataElements>
> <dataElementGroupSet/>
> </dataElementGroup>
> 
> 
> On Mon, Apr 8, 2013 at 10:27 PM, Rodolfo Melia <rmelia@xxxxxxxxxxxx> wrote:
> That sounds like a very good approach - I will try.
> 
> 
> On Mon, Apr 8, 2013 at 10:22 PM, Ola Hodne Titlestad <olati@xxxxxxxxxx> wrote:
> Hi Rodolfo,
> 
> You can also use the Web API to get an xml dump of a group of data elements like this:
> http://apps.dhis2.org/demo/api/dataElementGroups/qfxEYY9xAl6.xml
> 
> So you could 
> 1) put all the data elements you want to move over to another instance into one data element group, 
> 2) use the Web-API browser: http://apps.dhis2.org/demo/api/resources , 
> 3) click on html link next to DataElementGroups and then look for your group and click on the XML linkto get the XML you need for your data elements. 
> 4) That XML can be imported using metadata import on another instance.
> 
> Lars just explained that to me today so I have not tested it yet, but it is supposed to work. Lars, or others, please correct me if I am wrong.
> 
> Ola
> --------
> 
> 
> ----------------------------------
> Ola Hodne Titlestad (Mr)
> HISP
> Department of Informatics
> University of Oslo
> 
> Mobile: +47 48069736
> Home address: Eftasåsen 68, 0687 Oslo, Norway. Googlemaps link
> 
> 
> On 8 April 2013 22:34, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:
> Hi Rodolfo
> 
> The old metadata export used a very manually crafted parser for a language called dxf 1.0 which was past its sell-by date and becoming hard to maintain.
> 
> The newer metadata export uses dxf 2.0 which is a much more complete reflection of the domain objects but I note it doesn't allow the selection of particular dataelement groups or indicator groups.
> 
> We will be working on some functionality to export the selection of all metadata which might be related to a particular group of indicators, but that is coming.
> 
> In the meantime if there is particular filtering you want to do of the full metadata dump then share on this list and I (or someone else) can probably help with an xslt transform you could use which would be infinitely beter than editing manually.
> 
> If you are wanting to edit then there a number of approaches.  The oxygen xml editor is by far the best in my view but sadly not free.  emacs (nxml mode) works really well even on mac and windows but is not for everybody.  For working with xml from the mac or windows shell, then libxml from http://www.xmlsoft.org/ comes with the handy xmllint tool which can do lots of things, but one of the most useful is to "pretty print" format the xml.
>  
> Bob
> 
> 
> 
> On 8 April 2013 19:20, Rodolfo Melia <rmelia@xxxxxxxxxxxx> wrote:
> ... is gone
> 
> Hi - 2.10 as well as early development releases of 2.11 had an 'DXF Detailed Metadata Export' option. This function allowed to specify what Data Elements and Indicators to export. It was great for prototyping something in one server, and then moving the final definitions to another box. The final release of 2.11 doesn't have that option anymore. I curios to learn why the functionality was axed - i suspect some technical reasons relating to the explicit use of UID across the new version.
> 
> So if that function is not coming back, what is the best strategy for moving metadata from one instance to another? I imagine the answer is using an XML editor  and editing the export XML that you get from the metadata export option. Is that the case? Any suggestions of good XML editors that allow to read the resulting XML by a human being, so you can be selective about what you are moving between boxes? I'm looking for a Mac editor, and a Windows editor.
> 
> Rodolfo
> 
> -- 
> Rodolfo Meliá
> Principal
> rmelia@xxxxxxxxxxxx
> www.knowming.com
> +1 708 872 7636
> +44 777 576 4090
> Skype: rod.melia
> Twitter: @RodolfoMelia
> 
> Note: Please note my new email address, which I will be using for PSI related work: rmelia@xxxxxxxxxxxx
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
> 
> 
> 
> 
> 
> -- 
> Rodolfo Meliá
> Principal
> rmelia@xxxxxxxxxxxx
> www.knowming.com
> +1 708 872 7636
> +44 777 576 4090
> Skype: rod.melia
> Twitter: @RodolfoMelia
> 
> Note: Please note my new email address, which I will be using for PSI related work: rmelia@xxxxxxxxxxxx
> 
> 
> 
> -- 
> Rodolfo Meliá
> Principal
> rmelia@xxxxxxxxxxxx
> www.knowming.com
> +1 708 872 7636
> +44 777 576 4090
> Skype: rod.melia
> Twitter: @RodolfoMelia
> 
> Note: Please note my new email address, which I will be using for PSI related work: rmelia@xxxxxxxxxxxx


References