In Ellie v4.6, we added a new API endpoint for importing models. Here we’ll explain how to use this capability to programmatically import new Logical Models.
In simple terms, the overall process is like this:
You have a data model (or a definition of one) in an external source.
You extract the metadata of this model from the external source, including its entities, attributes, and relationships.
You transform the metadata of the model into the JSON format used by Ellie.
You call the POST /models endpoint with the JSON payload.
Ellie checks that the JSON is defined correctly.
Ellie creates a new Logical Model in your Model List.
This results in a new Logical Model being created in Ellie with all the entities, attributes, and relationships defined in the JSON file. The model diagram is automatically drawn on the canvas. The model itself is just like any other Logical Model in Ellie - you can edit it as you see fit, and e.g. move the entities around if you don’t find the auto-drawn diagram clear enough.
In general, you need two things to use the API endpoints:
The API must be enabled for your Ellie instance. By default, the API is not enabled for e.g. trials, and in some organizations, it might be completely disabled e.g. in case your IT department doesn’t want to have API endpoints available. If you’re unsure, you can always ask email@example.com! There is no extra cost on enabling the API.
You need to have an API key to authenticate. The API key is a token you can create & regenerate in Ellie’s admin interface (admin-level access needed). No API calls will go through unless a valid token is included. Note that the tokens are organization-wide, meaning that once you as an admin create one, it can be used by anyone in your organization.
The code samples include Python scripts for reading database metadata from Snowflake & PostgreSQL and importing those as new logical models to Ellie. You are free to use and copy these samples as you like (licensed under MIT license) - just let us know at firstname.lastname@example.org if you have bug reports or improvements!