Model Export / Import
Export model definitions to a JSON file and import them into another Primentra environment. Use it to move models between development, staging and production, or to share a structure between teams.
Both buttons — Export and Import — sit at the top of Settings → Models.
Export
- Go to Settings → Models and click Export.
- Choose what to include. The list is a tree: a row per model, expandable to its entities. Every entity is selected when the dialog opens.
- Use the checkbox on a model row to select or clear all of its entities, or expand it and pick entities one by one. Select all and Deselect all at the top right cover everything.
- Turn on any of the four options below.
- Click Export to download
primentra-export-YYYY-MM-DD.json.
| Option | What it adds | Default |
|---|---|---|
| Include data rows | All records in each selected entity | Off |
| Include permissions | Entity-level group permissions | Off |
| Include integration views | The SQL views built on the selected entities | Off |
| Include business rules | The validation rules defined on the selected entities | Off |
With Include data rows on, the dialog warns against exporting several large entities at once — it can take a while.
Domain references to entities you did not select are flagged in the export file, and the dialog says so before you export.
Integration views are captured with their configuration: excluded columns and the column snapshot taken at export time. A view whose entity is outside your selection is not included.
Import
The import runs in three steps: Upload, Preview, Import.
- Go to Settings → Models and click Import.
- Drop or select the
.jsonexport file. Only.jsonis accepted. - Review the preview and set an action for every entity.
- Set the import options below the tables.
- Click through to run the import. A progress bar reports each phase.
The entity table
Columns: Entity, Model, Status, Attributes, Rows, Action.
| Status | Meaning |
|---|---|
| New | The entity does not exist here. It will be created |
| Exists | The entity already exists. Your action decides what happens |
Pick one action per entity:
| Action | What happens |
|---|---|
| Overwrite | Replace every setting and attribute with the imported version |
| Skip | Leave the entity alone. Nothing is changed |
| Merge | Update only the fields that differ |
A line under the table keeps the running total: how many entities will be created, updated and skipped.
Import options
The options appear only when the file carries something for them:
- Import data rows — shown when any entity in the file has rows. On by default.
- Import integration views — shown when the file carries views. On by default when at least one of them can be resolved here.
- Import business rules — shown when the file carries rules. Off by default.
Integration views
When the file holds views, an Integration Views table appears beside the entity table, with columns View, Entity, Model, Status and Action.
| Status | Meaning | Choice |
|---|---|---|
| New | No view with this name exists here | Create or Skip |
| Exists | A view with this name already exists here | Overwrite or Skip |
| Cannot resolve | The view's entity is in neither this file nor this environment | None — it reads Will be skipped |
Domain attribute warnings
If an imported entity references a domain entity that is not in the file, a warning appears during the preview. The import can still run, but the domain link stays unresolved until that entity is created or imported separately.
The result
The final step reports tiles for entities created, updated and skipped, plus rows imported and permissions skipped where those apply. Business rules and integration views get tiles of their own.
Two panels can appear underneath:
- Changed Definitions — every view you imported over an existing one whose stored definition differed from the file. This is the record of an edit made directly in this environment before the import ran, so nothing is overwritten silently. A straight round trip, with no changes since export, produces no entry here.
- Warnings — every view that could not be resolved, and any view whose SQL failed to build after being saved. A view you chose to skip is never listed: that was your choice, not a problem.
A third panel, Business rules imported inactive, names rules whose columns could not be matched in this environment. They are imported but switched off, so nothing validates against a column that is not there.

Permissions
Permissions can travel in the export file. On import, users are matched by email address:
- The user must exist, be active, and not be deleted.
- The role named in the file must exist here, and the user must be a member of it.
- Entries that do not match all of that are skipped and counted in the result.
No users and no roles are created by an import — only existing accounts are matched. Imported permissions are applied at entity scope with Read access, and entity-scope permissions that are not in the file are removed.
What this is, and is not
Export and import move model structure from one Primentra environment to another. For a one-time promotion — take what DEV has and put it in PROD — this is the tool.
It is not an environment-sync tool:
- There is no diff between the file and the target. The preview shows New or Exists per entity, and a status plus an import-or-skip choice per view — not a field-by-field comparison of what will change.
- There is no preview of the SQL a view will run before it is deployed.
- There is no history of what was imported and when, beyond the result summary shown at the end of each run.
If you need continuous synchronization rather than a single promotion, you still need your own process for tracking what changed between exports.
Related
- Models — where both buttons live
- Entity Management — clone an entity within one environment
- Integration Views — the views the export carries
- Business Rules Overview — the rules the export carries
- Roles & Permissions — the permissions matched on import