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)
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.
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)
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.
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)
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.
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)
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.
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.
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)
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…
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.
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.
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)
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…
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.
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.
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)