Convert model into a Polyglot in another repository
When converting a model into a Polyglot model, you can choose to make the original model dependent on the generated Polyglot. This dependency works seamlessly, even when both models live in different repositories (cross-repository remote references.)
However, during the conversion of a model to Polyglot, you cannot select a remote location for the generated Polyglot model. The target Polyglot must be created locally, which means you cannot generate it directly inside another repository. As a matter of fact, you might not even have write credentials in that remote repository, and would need to create a pull request.
Fortunately, you can still reach the desired outcome by following the steps below.
Prerequisite: work with local clones
Make sure that both repositories (the one of the model to convert and the one for the Polyglot to generate) are also as a local clone.
This operation cannot be performed from the Browser or from a remotely opened model.
Steps
- in Hackolade Studio Desktop, open from your local clone the model to be converted
- initiate the process Convert to Polyglot and choose "Dependent, relative path"
- for the Polyglot location, select the local destination on your machine, inside the local clone of the other repository.
-
- Warning: the link will be stored as a relative local path, which is not what we ultimately want. We will fix this later.
- save the model which is now derived from the generated Polyglot
-
- the Polyglot model is created, and a dependency link is established -- but this link is still local
- commit and push the generated Polyglot model to the other repository, so it becomes available remotely for everyone
- go back to the original model (the one that was converted and is now derived)
- edit the Polyglot link so that it now references the Polyglot from its remote location.
-
- this stores the link as a proper cross-repository reference, which is the expected configuration
Important notes
Risk: local-only link
If you do not update the Polyglot link, the link will still work only on your machine, because it points to a local path. Your colleagues will have a broken link.
Convert & Merge
Storing the Polyglot directly in the local clone of the other repository allows you to following these steps for a Convert\&Merge feature, when the Polyglot already exists and needs to be merged with the newly generated one.