mintproject / MINT-DataCatalog-Public

Public-facing aspects of data catalog, such as documentation, demos, tracking issues, and feature requests
Apache License 2.0
1 stars 1 forks source link

Delete/update registered resources/datasets #15

Closed minhptx closed 4 years ago

minhptx commented 4 years ago

Currently, there is no way to delete resources/datasets if mistakes are made in the registration. Also, even though most of the attributes in a resource (name, description, data_url, ...) can be changed, the dataset linked to it cannot be changed.

It would be useful if these features can be included in the API.

dnfeldman commented 4 years ago

fyi you can delete resources: POST to {api_url}/resources/delete_resource with

{
  "provenance_id": <provenance_id under which the resource was registered>,
  "resource_id": <resource uuid>
}

You can also delete datasets: POST to {api_url}/datasets/delete_dataset with

{
  "provenance_id": <provenance_id under which the dataset was registered>,
  "dataset_id": <dataset uuid>
}

Updating resource's dataset_id is a bit more problematic since a resource is also associated with dataset's variables. So it's not immediately clear what should happen if let's say you want to associate resource "R2" with variables "R2_V1, R2_V2" with dataset "D" whose variables are "D_Va", "D_Vb", "D_Vc". Should a resource automatically inherit all of the variables under a new dataset? Or should the dataset inherit variables from the resource? I think you can make an argument for both, that's why that feature is currently not supported at the API level. But hopefully in the UI it will be possible to do things like "Create new dataset D2 like dataset D1, except description should be 'blah'". I created another issue to track that functionality: https://github.com/mintproject/MINT-DataCatalog-Public/issues/16