I need to know how to skip the synchronization of some metadata during metadata synchronization, for example, syncing only specific data elements and organization unit during metadata synchronization and not all the metadata on the system. Please, can someone help?
I hope you are well today. Did you manage to achieve this? kindly let us know.
The metadata sync service is based on the lastUpdated date property. So I think maybe you can try to do following steps:
- Create a new metadata sync version ( version_1 ) to export all of current objects, those you don’t want to sync.
- Update a set of objects you want to sync ( can use web api ).
- Create a new metadata sync version ( version_2 ), this version will include all need objects from step 2.
- Do sync only version_2 using endpoint api/metadata/sync?versionName=version_2
Hope it solves your problem.
At WHO we have been working on developing an application to send metadata (and data) from one to one or multiple other DHIS2 instances. You can select subsets of data elements (or any other type of metadata) to be sent very easily!
We have just release the latest version, sharing the link to the release in case it helps: MetaData Sync app 2.2.0 now available
It does a bunch of other things like sending data from one DHIS2 instance to another one with different metadata (making all necessary transformations on the fly) or scheduling metadata and data push.
Hope it helps!