Julio
Julio

Reputation: 401

How to safely delete an object property without losing the object edits?

In the Ontology Editor, I get warnings when I try to remove a property. See picture below.

I want to keep the other columns or properties on the object without losing the edits.

Is that possible? What's the requirement to do that?

screenshot of warning

Upvotes: 4

Views: 542

Answers (1)

tomwhittaker
tomwhittaker

Reputation: 381

There are a couple of ways to achieve this. I would definitely recommend trying both methods out on a test object before deciding which method you would be more comfortable with!

Object Storage V1

  • Create a new writeback dataset.
    1. You can create a newdataset with all the edits, by either downloading it or creating a new dataset downstream.
    2. Use this new dataset upstream of the object type to update the input dataset.
    3. As these edits are now stored in the input datasets, the updates will not be deleted when deleting this property from the object.
  • API Calls (Note : I haven't used this method, but it should still be possible)
    1. You can make an API call [1] to get all edit events from phonograph on the object type and store the events.
    2. After removing the property from phonograph and deleting the edits, make another API call [2] to post the edits back.

Both of these do not maintain the metadata of these edits i.e. when the edit was made.

Object Storage V2 (Not yet released) It will be possible to delete properties without losing edits by either:

  • Migrating the edits for that property to a new property.
  • Discarding the edits for that property.

[1] https://{BASE_URL}/workspace/documentation/developer/api/phonograph2/services/ObjectStorageService/endpoints/getObjectEvents

[2] https://{BASE_URL}/workspace/documentation/developer/api/phonograph2/services/ObjectStorageService/endpoints/postObjectEvents

Upvotes: 1

Related Questions