Metadata export and category option combos

Hi,
I’m in a situation where I want to transfer data and metadata for one dataset from one DHIS instance to another. My initial idea was to use the «Meta-Data Detailed Export» from the source database, select the relevant dataset, and check «include dependencies». This creates an XML-file with the dataset, data element, cateories, categorycombos etc as expected. However, after importing this metadata into the target database, I realised that it did not include the categoryoptioncombos (with IDs). In other words, even though I have the same data elements, categories, categorycombos etc in both databases, I’m not able to transfer data between the two since the data export relies on the categoryoptioncombo.

One work-around is of course to use the «regular» meta-data export and selecting category option combos, but then it includes the metadata for ALL categorycombos, not just the three I’m interested in - so I will either have to edit the XML or delete the ones I don’t need later.

Am I missing a more obvious/simpler way of doing this? Is it by design or by oversight that the categoryoptioncombos are not included in the detailed export? (I realise the categoryoptioncombos are a bit «special» since they can be regenerated later etc)

Olav

Hi Olav

I hit the same problem last month and I think it is a bug - see https://bugs.launchpad.net/dhis2/+bug/1400085

As a workaround I made a set of xslt transforms which starts from the full metadata export and “prunes” it down to all metadata associated with, in my case, a dataelementgroup but it should be easily modified for a dataset. If this would be useful to you let me know.

Bob

···

On 6 January 2015 at 12:11, Olav Poppe olav.poppe@me.com wrote:

Hi,

I’m in a situation where I want to transfer data and metadata for one dataset from one DHIS instance to another. My initial idea was to use the «Meta-Data Detailed Export» from the source database, select the relevant dataset, and check «include dependencies». This creates an XML-file with the dataset, data element, cateories, categorycombos etc as expected. However, after importing this metadata into the target database, I realised that it did not include the categoryoptioncombos (with IDs). In other words, even though I have the same data elements, categories, categorycombos etc in both databases, I’m not able to transfer data between the two since the data export relies on the categoryoptioncombo.

One work-around is of course to use the «regular» meta-data export and selecting category option combos, but then it includes the metadata for ALL categorycombos, not just the three I’m interested in - so I will either have to edit the XML or delete the ones I don’t need later.

Am I missing a more obvious/simpler way of doing this? Is it by design or by oversight that the categoryoptioncombos are not included in the detailed export? (I realise the categoryoptioncombos are a bit «special» since they can be regenerated later etc)

Olav


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Hi Olav,

this was actually fixed in trunk and 2.17 two days ago. You can now use the meta-data detailed export and make an export of the category combos that you need to transfer (those used for the data elements in your data sets). You then import that file first. It will contain all the relevant category option combos for those category combos.

regards,

Lars

···

On Tue, Jan 6, 2015 at 1:11 PM, Olav Poppe olav.poppe@me.com wrote:

Hi,

I’m in a situation where I want to transfer data and metadata for one dataset from one DHIS instance to another. My initial idea was to use the «Meta-Data Detailed Export» from the source database, select the relevant dataset, and check «include dependencies». This creates an XML-file with the dataset, data element, cateories, categorycombos etc as expected. However, after importing this metadata into the target database, I realised that it did not include the categoryoptioncombos (with IDs). In other words, even though I have the same data elements, categories, categorycombos etc in both databases, I’m not able to transfer data between the two since the data export relies on the categoryoptioncombo.

One work-around is of course to use the «regular» meta-data export and selecting category option combos, but then it includes the metadata for ALL categorycombos, not just the three I’m interested in - so I will either have to edit the XML or delete the ones I don’t need later.

Am I missing a more obvious/simpler way of doing this? Is it by design or by oversight that the categoryoptioncombos are not included in the detailed export? (I realise the categoryoptioncombos are a bit «special» since they can be regenerated later etc)

Olav


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Excellent. If its a small fix I wonder would it be easy to backport to 2.16? I can check. Then I can throw those xslt transforms away …

···

On 6 January 2015 at 12:37, Lars Helge Øverland larshelge@gmail.com wrote:

Hi Olav,

this was actually fixed in trunk and 2.17 two days ago. You can now use the meta-data detailed export and make an export of the category combos that you need to transfer (those used for the data elements in your data sets). You then import that file first. It will contain all the relevant category option combos for those category combos.

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On Tue, Jan 6, 2015 at 1:11 PM, Olav Poppe olav.poppe@me.com wrote:

Hi,

I’m in a situation where I want to transfer data and metadata for one dataset from one DHIS instance to another. My initial idea was to use the «Meta-Data Detailed Export» from the source database, select the relevant dataset, and check «include dependencies». This creates an XML-file with the dataset, data element, cateories, categorycombos etc as expected. However, after importing this metadata into the target database, I realised that it did not include the categoryoptioncombos (with IDs). In other words, even though I have the same data elements, categories, categorycombos etc in both databases, I’m not able to transfer data between the two since the data export relies on the categoryoptioncombo.

One work-around is of course to use the «regular» meta-data export and selecting category option combos, but then it includes the metadata for ALL categorycombos, not just the three I’m interested in - so I will either have to edit the XML or delete the ones I don’t need later.

Am I missing a more obvious/simpler way of doing this? Is it by design or by oversight that the categoryoptioncombos are not included in the detailed export? (I realise the categoryoptioncombos are a bit «special» since they can be regenerated later etc)

Olav


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Thanks for the replies.

Updated to 2.17 rev 17684, but I still don’t get the category option combos when exporting category combos with dependencies - it gives me categories, categoryOptions and categoryCombos only.

Olav

···

On 6 January 2015 at 12:37, Lars Helge Øverland larshelge@gmail.com wrote:

Hi Olav,

this was actually fixed in trunk and 2.17 two days ago. You can now use the meta-data detailed export and make an export of the category combos that you need to transfer (those used for the data elements in your data sets). You then import that file first. It will contain all the relevant category option combos for those category combos.

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On Tue, Jan 6, 2015 at 1:11 PM, Olav Poppe olav.poppe@me.com wrote:

Hi,

I’m in a situation where I want to transfer data and metadata for one dataset from one DHIS instance to another. My initial idea was to use the «Meta-Data Detailed Export» from the source database, select the relevant dataset, and check «include dependencies». This creates an XML-file with the dataset, data element, cateories, categorycombos etc as expected. However, after importing this metadata into the target database, I realised that it did not include the categoryoptioncombos (with IDs). In other words, even though I have the same data elements, categories, categorycombos etc in both databases, I’m not able to transfer data between the two since the data export relies on the categoryoptioncombo.

One work-around is of course to use the «regular» meta-data export and selecting category option combos, but then it includes the metadata for ALL categorycombos, not just the three I’m interested in - so I will either have to edit the XML or delete the ones I don’t need later.

Am I missing a more obvious/simpler way of doing this? Is it by design or by oversight that the categoryoptioncombos are not included in the detailed export? (I realise the categoryoptioncombos are a bit «special» since they can be regenerated later etc)

Olav


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Sorry seems I forgot to back-port 1 commit, did it now and triggered build on CI.

Bob - sorry there was a lot of commits related to this, the filtered meta-data export had some issues, so will be complicated to back-port to 2.16. Hope you can update to 2.17 sometime soon…

Lars

···

On Tue, Jan 6, 2015 at 3:48 PM, Olav Poppe olav.poppe@me.com wrote:

Thanks for the replies.

Updated to 2.17 rev 17684, but I still don’t get the category option combos when exporting category combos with dependencies - it gives me categories, categoryOptions and categoryCombos only.

Olav

  1. jan. 2015 kl. 13.39 skrev Bob Jolliffe bobjolliffe@gmail.com:

Excellent. If its a small fix I wonder would it be easy to backport to 2.16? I can check. Then I can throw those xslt transforms away …

On 6 January 2015 at 12:37, Lars Helge Øverland larshelge@gmail.com wrote:

Hi Olav,

this was actually fixed in trunk and 2.17 two days ago. You can now use the meta-data detailed export and make an export of the category combos that you need to transfer (those used for the data elements in your data sets). You then import that file first. It will contain all the relevant category option combos for those category combos.

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On Tue, Jan 6, 2015 at 1:11 PM, Olav Poppe olav.poppe@me.com wrote:

Hi,

I’m in a situation where I want to transfer data and metadata for one dataset from one DHIS instance to another. My initial idea was to use the «Meta-Data Detailed Export» from the source database, select the relevant dataset, and check «include dependencies». This creates an XML-file with the dataset, data element, cateories, categorycombos etc as expected. However, after importing this metadata into the target database, I realised that it did not include the categoryoptioncombos (with IDs). In other words, even though I have the same data elements, categories, categorycombos etc in both databases, I’m not able to transfer data between the two since the data export relies on the categoryoptioncombo.

One work-around is of course to use the «regular» meta-data export and selecting category option combos, but then it includes the metadata for ALL categorycombos, not just the three I’m interested in - so I will either have to edit the XML or delete the ones I don’t need later.

Am I missing a more obvious/simpler way of doing this? Is it by design or by oversight that the categoryoptioncombos are not included in the detailed export? (I realise the categoryoptioncombos are a bit «special» since they can be regenerated later etc)

Olav


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

OK thanks.

···

On 6 January 2015 at 17:04, Lars Helge Øverland larshelge@gmail.com wrote:

Sorry seems I forgot to back-port 1 commit, did it now and triggered build on CI.

Bob - sorry there was a lot of commits related to this, the filtered meta-data export had some issues, so will be complicated to back-port to 2.16. Hope you can update to 2.17 sometime soon…

Lars

On Tue, Jan 6, 2015 at 3:48 PM, Olav Poppe olav.poppe@me.com wrote:

Thanks for the replies.

Updated to 2.17 rev 17684, but I still don’t get the category option combos when exporting category combos with dependencies - it gives me categories, categoryOptions and categoryCombos only.

Olav

  1. jan. 2015 kl. 13.39 skrev Bob Jolliffe bobjolliffe@gmail.com:

Excellent. If its a small fix I wonder would it be easy to backport to 2.16? I can check. Then I can throw those xslt transforms away …

On 6 January 2015 at 12:37, Lars Helge Øverland larshelge@gmail.com wrote:

Hi Olav,

this was actually fixed in trunk and 2.17 two days ago. You can now use the meta-data detailed export and make an export of the category combos that you need to transfer (those used for the data elements in your data sets). You then import that file first. It will contain all the relevant category option combos for those category combos.

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On Tue, Jan 6, 2015 at 1:11 PM, Olav Poppe olav.poppe@me.com wrote:

Hi,

I’m in a situation where I want to transfer data and metadata for one dataset from one DHIS instance to another. My initial idea was to use the «Meta-Data Detailed Export» from the source database, select the relevant dataset, and check «include dependencies». This creates an XML-file with the dataset, data element, cateories, categorycombos etc as expected. However, after importing this metadata into the target database, I realised that it did not include the categoryoptioncombos (with IDs). In other words, even though I have the same data elements, categories, categorycombos etc in both databases, I’m not able to transfer data between the two since the data export relies on the categoryoptioncombo.

One work-around is of course to use the «regular» meta-data export and selecting category option combos, but then it includes the metadata for ALL categorycombos, not just the three I’m interested in - so I will either have to edit the XML or delete the ones I don’t need later.

Am I missing a more obvious/simpler way of doing this? Is it by design or by oversight that the categoryoptioncombos are not included in the detailed export? (I realise the categoryoptioncombos are a bit «special» since they can be regenerated later etc)

Olav


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp