Remove metadata fields

87 views
Skip to first unread message

dataverse adm

unread,
May 4, 2021, 4:17:42 AM5/4/21
to Dataverse Users Community
Hi all,

I want to add custom metadata fields/blocks to datasets, and have been able to produce this using the documentations (https://guides.dataverse.org/en/5.4.1/admin/metadatacustomization.html?). However, I am now struggling with removing these test entries and cannot find any information on how to remove certain blocks from the metadata entry list. I have tried to upload a metadata block TSV file containing only the blocks I want, but the other blocks stay regardless. Only new blocks are added, and the previous ones stay. 

Calling the cURL command curl http://localhost:8080/api/admin/index/solr/schema returns all the previously stored values as well as the current ones. For example, I added a test title labelled title1 and it appears as the following in the cURL command:
<field name="title1" type="text_en" multiValued="false" stored="true" indexed="true"/>
<copyField source="title1" dest="_text_" maxChars="3000"/>

Does anyone have any prior knowledge of how to remove specific metadata blocks?

Thanks all

Philip Durbin

unread,
May 4, 2021, 10:42:24 AM5/4/21
to dataverse...@googlegroups.com
Unfortunately, there is no supported way to remove metadata blocks (via API or whatever). Instead, the guide you linked warns that you may have to drop your database while working on the block: "you should have a Dataverse Software development environment set up for testing where you can drop the database frequently while you make edits to TSV files."

If you want, please go ahead and create an issue called something like "remove unused custom metadata block via API" at https://github.com/IQSS/dataverse/issues

Phil

p.s. On a related note, I had one suggested a preview mode for loading metadata blocks at https://github.com/IQSS/dataverse/issues/2551

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/35f2d553-f02a-4d3e-b1c6-edd7826a0d5dn%40googlegroups.com.


--

dataverse adm

unread,
May 6, 2021, 5:44:52 AM5/6/21
to Dataverse Users Community
Thank you for your reply Phil, it is highly appreciated. 

I understand. So what is the functionality of the preview mode? I tested it out but cannot seem to find out the difference between including and omitting preview=true in the API calls. 

Also, to be clear: any existing metadata block cannot be removed, as things stand today?

Philip Durbin

unread,
May 6, 2021, 10:28:34 AM5/6/21
to dataverse...@googlegroups.com
Sorry for the confusion. preview=true was never implemented. It was just an idea.

And yes, what I'm saying is the way to remove a metadata block is through direct manipulation of the database, which I don't recommend.

Please feel free to open a GitHub issue if you'd like a way to remove an empty metadata block via API.

Thanks,

Phil

Reply all
Reply to author
Forward
0 new messages