Start a new topic

SQL request to purge old DataModelsfrom Repository

Hi,


We have a lot (more than 100) DataModel in our Repository.
We're lookup for a way to purge most of them (like 90%) in order to speed up the validation/deployments/export/etc.

Is there some SQL requests we can run to do so?

Regards.


Hello Gregory,


Thank you for reaching out.

When you are saying data model, does it mean closed model editions?

And could you please also share here the semarchy version you are on?


Thx

Best regards,

Alexia

Hello,


yes, I'm talking about the old closed Model edition
like:

  • DataModel [0.0] CLOSED
  • DataModel [0.1] CLOSED
  • DataModel [0.2] CLOSED
  • DataModel [0.3] CLOSED
  • ...
  • DataModel [0.84] OPEN

I want to remove  all Closed edition under 80, for exemple (except 1/10 model i want to keep for history)

Expected result:
  • DataModel [0.0] CLOSED
  • DataModel [0.10] CLOSED
  • DataModel [0.20] CLOSED
  • DataModel [0.30] CLOSED
  • DataModel [0.40] CLOSED
  • DataModel [0.50] CLOSED
  • DataModel [0.60] CLOSED
  • DataModel [0.70] CLOSED
  • DataModel [0.80] CLOSED
  • DataModel [0.81] CLOSED
  • DataModel [0.82] CLOSED
  • DataModel [0.83] CLOSED
  • DataModel [0.84] OPEN


We are running on 2024.1.8 LTS.

I can track each records in Repository DB witch have the BRANCH_ID/EDITION_ID that I want to remove
But, i'm not sure I will not generate error for the edition I want to keep.
And I'm not sure, I will remove every records that is needed to be removed.
So, I'm wandered if Semarchy (or someone else) have SQL script that can purge the old DataModel edition

Thank.

In this case, we have even better.


For v2024.1.x versions, you can add the following property “-Dcom.semarchy.feature.delete.closed.model.editions=true“ (it usually is in the setenv file, but it might be different according to your install) and restart your tomcat.

It will provide you the option to right click on a closed model edition to delete it.

This solution seem perfect !
Thank you very mush, I will test it


Regards

Perfect, I hope it will answer your need.


Best regards,

Alexia

Login to post a comment