Merge (JSON Schema)
This guide assumes that you have already imported your schema, or at least followed the Dynamic (JSON Schema) guide, and imported the sample schema, thus having an import profile ready.
The Merge JSON Schema feature enables users of synchronizing a model that has been changed outside CoreModels, by detecting and applying the changes in CoreModels.
Note: you can use the merge import feature to import into an empty space, the merge grid will show that all the nodes are new, and will be created during the process.
First, open the profile UI:
After an import has been done, the profile UI tab should exist in the CoreModels tab, but if you close it, you can find the profile here: Features Tray โ Grids โ Json Schena Import/Export Config Grids โ profile name.
In the profile Settings (top bar), Click on the switch (it should display 'Dynamic' by default), you'll notice that the wizard now has an additional step called 'Merge'.
Click on the 'Merge' button to go to the Merge grid.
CoreModels will fetch the data source then detect and list out all the changes that has happened (1), which are necessary to synchronize the space, it will also show the number of changes categorized by their status in the stats bar (2).
you can now review the changes that has happened, and unmark the changes that you don't want to apply in CoreModels (3), you can also mark/unmark the changes based on their status (4).

Click on Proceed to apply the changes, the UI will auto direct to the Tasks tab and show you the progress of the merge process, then it will auto refresh when the merge is complete.
JSON Schema Merge Algorithm, How does it work ?
When merging an external data source with a CoreModels space (destination), it uses the type name to find the matching types, once it matches the types, it starts matching child elements, then it tries to compare any remaining type or element.
It compares the source data that is parsed from the data source, with the stored data based on the mappings provided in the profile.
It also detects order updates that has happened to the source, both the order of the objects, and the order of the JSON array elements inside the properties.
Last updated