-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dataset Migration API: Cannot migrate a dataset using example json-ld file, complains about Contact E-mail being null though it is specified. (testSemanticMetadataAPIs) #8533
Comments
For fields without a termURI in the metadata block definition, the current code assumes it can assign terms using a block level namespace and the title. When #8454 changed the titles for citation block fields, it exposed the limits of this heuristic - while the titles are often more readable than names, it leads to the problem here as title is being used as part of the identifier in the semantic APIs (which are still thankfully described as 'experimental'). I see four options: Two change the semantic URLs assigned to the terms and thus are 'breaking changes' for the semantic APIs/machine users of the OAI-ORE files.
For anyone really using semantic tools, these options are ~the same ("https://dataverse.org/schema/citation/Contact" changes to "https://dataverse.org/schema/citation/datasetContact"). For anyone who's creating json and then slapping the @context on as a static addition, the latter could be easier (perhaps not since the "citation:" prefix has to be dropped on the field entries along with changing the @context). Two others would preserve the existing semantic identifiers:
I'm not sure what makes the most sense, but given that the OAI-ORE files go in Bags and DANS (heads-up @janvanmansum )/others(?) are using the json-ld migrate APIs, we should probably decide on/implement a fix before releasing #8454 as that alone would break things in json-ld. (Mea culpa - should not have decided to/agreed with using a non identifier field in creating semantic URIs for internally defined terms in blocks. They have been stable for 4+ years, and there was hope that more would get mapped to external vocabs before too long, but still...) |
Update:
The cause was a change to the citation.tsv file where the Contact field name has changed to Point of Contact. If I manually edit the example file to use that, it works. So the fix would be to update the example file to use the new name:
Change:
"citation:Contact": {
"datasetContact:Name": "Admin, Dataverse",
"datasetContact:Affiliation": "GDCC",
"datasetContact:E-mail": "[email protected]"
},
to be:
"citation:Point of Contact": {
"datasetContact:Name": "Admin, Dataverse",
"datasetContact:Affiliation": "GDCC",
"datasetContact:E-mail": "[email protected]"
},
Error on command line, no server log error:
curl -H X-Dataverse-key:9aef05f2-eca0-412e-be4b-4c56697700cc -X POST "http://localhost:8080/api/dataverses/root/datasets/:startmigration" --upload-file dataset-migrate.jsonld
{"status":"ERROR","message":"Validation Failed: Contact E-mail is required. (Invalid value:edu.harvard.iq.dataverse.DatasetField[ id=null ])."}
Also tried specifying file type, same results:
curl -H 'Content-Type:application/ld+json' -H X-Dataverse-key:XXX-YYY-ZZZ -X POST "http://localhost:8080/api/dataverses/root/datasets/:startmigration" --upload-file dataset-migrate.jsonld
{"status":"ERROR","message":"Validation Failed: Contact E-mail is required. (Invalid value:edu.harvard.iq.dataverse.DatasetField[ id=null ])."}
Took file from doc:
https://guides.dataverse.org/en/5.10/_downloads/e6c9ad6742e37c64eabaea749a13fa27/dataset-migrate.jsonld
The text was updated successfully, but these errors were encountered: